What happens when a main method is declared as private?

Answer Posted / amit kumar chaubey

If the main function is made private...it will compile
Sucessfully...and at the time of execution...it will
execute successfully...but desired result will not be
obtained. After execution..folowin message will be printed:
Main method not public.

Is This Answer Correct ?    25 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the steps involved to write rmi based programs?

575


What is the formula to calculate percentage?

541


How do you override a variable in java?

539


What is the main use of java?

580


Differentiate between a class and an object.

571






Is upper case in java?

537


What is final method in java?

551


Which method returns the length of a string?

575


What is a "pure virtual" member function?

602


What is method in java ?

631


What is the use of jtable?

663


What is java and its types?

557


What is the purpose of declaring a variable as final?

497


Explain parallel processing in java8?

642


What is class forname?

551