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 is the difference between static method and instance method in Java?

835


How do you compare characters in java?

740


How do I know if java is installed?

789


What is a final class in java?

788


Explain about instanceof operator in java?

818


Why destructor is not used in java?

752


Can a main method be overloaded?

791


Do we need to manually write Copy Constructor?

801


What is the symbol for space?

772


What is logical variable?

738


What is bool mean?

762


What are the different approaches to implement a function to generate a random number?

813


Is 0 an irrational number?

829


What is mnemonic in assembly language?

826


What are the concepts of 'OOPS'?

836