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 are alternatives to java serialization?
What is double in java?
How many types of methods are there?
Implement a stack with push (), pop() and min() in O(1) time.
What is identifier give example?
What is broken and continue statement?
Does java trim remove newline?
What are the important features of Java 10 release?
why Java does not support multiple inheritances?
What is object-oriented programming?
What are 4 pillers of object orinted programming?
What is vector?
How do you compare objects in java?
What is boolean logic?
Can we use string in switch case in java?