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
Does java have a compiler?
How to compare two strings in java program?
Explain listiterator and methods in listiterator?
What is the core java?
Explain throw keyword in java?
What is keyword auto for?
What is the difference between access specifiers and access modifiers in java? 16
What is a null point?
Does the order of public and static declaration matter in main method?
What programs use java?
Does importing a package imports its sub-packages as well in java?
What is hashing in java?
Will set allow duplicates in java?
What is the use of flag?
What is the impact of declaring a method as final?