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


Please Help Members By Posting Answers For Below Questions

What are access specifiers available in java?

569


What is private static in java?

569


How does arraylist size increase in java?

523


Write the algorithm to check the number non-leaf nodes in a tree.

576


How do you declare a string variable?

508






Define how destructors are defined in java?

578


What is the mapping mechanism used by java to identify IDL language?

581


What does microservices mean?

522


Can we use both this () and super () in a constructor?

536


What is numel matlab?

638


Which class cannot be a subclass in java?

530


v-model life cycle

1614


Write a function to print Fibonacci series and Tribonacci series?

743


What does a void function return?

539


How to store image in arraylist in java?

501