can we override the main() method in java????
Answer Posted / rajkumar
Hi ,You have rights to overload main(),but jvm can invoke
only main with String[] s. not other arguments main.If u
come for override both sub class and super class can hold
its own main. any way we can't invoke main with help of
either object ref or super. but at compile time we can't get
any error suppose both super and sub has main
| Is This Answer Correct ? | 4 Yes | 10 No |
Post New Answer View All Answers
What is a flag value?
What is square root in java?
What is bom encoding?
What is time complexity java?
What is string made of?
Why is java called the platform independent programming language?
explain local datetime api in java8?
What happens if an exception is not handled in a program?
What is data member in java?
What is the difference between compile-time polymorphism and runtime polymorphism?
How can you read content from file in java?
What are the wrapped, classes?
What is hasnext in java?
What is difference between overloading and overriding in java?
What is are packages?