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 access specifiers available in java?
What is private static in java?
How does arraylist size increase in java?
Write the algorithm to check the number non-leaf nodes in a tree.
How do you declare a string variable?
Define how destructors are defined in java?
What is the mapping mechanism used by java to identify IDL language?
What does microservices mean?
Can we use both this () and super () in a constructor?
What is numel matlab?
Which class cannot be a subclass in java?
v-model life cycle
Write a function to print Fibonacci series and Tribonacci series?
What does a void function return?
How to store image in arraylist in java?