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 |
In treeset we add same object ...what will be the out put
What is lazy programming?
What is the largest number a double can hold?
What classes of exceptions may be thrown by a throw statement?
What is a buffer in java?
To what value is a variable of the Boolean type automatically initialized?
How to print a statement without using semicolan in java
How do you take thread dump in java?
What is javac in java?
What is math exp in java?
What is I/O Filter?
Can we serialize singleton class?