What happens when a main method is declared as private?

Answer Posted / yogesh gandhi

Wrong Vani.

The output of the program is

C:\>javac abc.java

C:\>java abc
Main method not public.

Is This Answer Correct ?    72 Yes 5 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are static methods?

564


What do you mean by an interface in java?

559


What is the program compilation process?

571


Why do we need singleton?

521


What is high level language in computer?

522






Why is stringbuffer called mutable?

551


why Java does not support multiple inheritances?

690


When can an object reference be cast to an interface reference in java programming?

559


What is use of set in java?

477


What is called module?

552


Justify your answer that you can't define a method inside another method in java, if you can then how?

589


What is proper subset?

528


What is the difference between jdk, jre, and jvm?

558


What is core java used for?

496


How many threads does a core java have?

501