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

Which is illegal identifier in java?

577


How to access arraylist elements in java?

482


Why collection is called framework in java?

527


What is an empty string in css?

513


What is the purpose of finalization in java programming?

546






Explain enumeration in java?

553


Are arrays immutable in java?

529


You're given a Boolean 2D matrix, can you find the number of islands?

578


What is equlas() and hashcode() contract in java? Where does it used?

589


When should I use a singleton?

541


What are different exception types exceptions available in java ?

467


What does it mean to be immutable?

534


What does string [] args mean?

529


What is length in java?

558


What is unmodifiable list in java?

515