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
Can we extend private class in java?
What is time complexity algorithm?
Can we write multiple catch blocks under single try block?
What is difference between fail-fast and fail-safe?
How do you sort in ascending order in java?
Explain about fail fast iterators in java?
What happens when a thrown exception is not handled?
What is the purpose of assert keyword used in jdk1.4.x?
What is the use of set in java?
Why stringbuilder is not thread safe?
Explain about interthread communication and how it takes place in java?
Why is java not 100% pure oops?
What is the purpose of the finally clause of a try-catch-finally statement in java programming?
Which are the two subclasses under exception class?
What is bean? Where it can be used?