can we override the main() method in java????
Answers were Sorted based on User's Feedback
Answer / zameer
Yes we can override the main() method in java but that main() method are not declare static keyword.
If main() method is static then we can not override
| Is This Answer Correct ? | 4 Yes | 2 No |
Answer / 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 |
What is use of functional interface in java 8? Explain
Is java hashset ordered?
What do you mean by inner class in java?
What is System class and its purpose?
What is numeric data type?
What modifiers can be used with a local inner class?
What is thin driver and thick driver. why it is called so?
Is break statement can be used as labels in java?
What are the types of relation?
How can I debug the Java security exceptions and AccessControlExceptions?
What is an 8 bit word?
What are the super most classes for all the streams?