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 |
Why is the singleton pattern considered to be an anti pattern?
What is the exact difference in between Unicast and Multicast object ?
What is the importance of static variable?
What is ellipsis in java?
how can we use the servlet as standalone apllication?should we need to extend any class?
Can constructor return value?
What is oop principle in java?
What is difference between Iterator and for loop
What is the purpose of static methods and static variables?
what is ABSTRACTION and what are using in real time project?
What is the difference between multiple processes and multiple threads?
what are synchronized methods and synchronized statements? : Java thread