Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...

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 navigable map in java?

168


What is use of super keyword in java?

222


what are three ways in which a thread can enter the waiting state? : Java thread

177


What are the two basic ways in which classes that can be run as threads may be defined?

210


Why we use set in java?

179






Explain what access modifiers can be used for methods?

249


Can we write a class without main method in java?

157


How will you load a specific locale?

205


What is meant by tab pans?

238


Can we use catch statement for checked exceptions when there is no chance of raising exception in our code?

231


What are the three parts of a lambda expression? What is the type of lambda expression?

224


Can you explain the final method modifier?

210


How do you declare a variable?

181


What is an class?

257


What happens if a try-catch-finally statement does not have a catch clause to handle an exception that is thrown within the body of the try statement?

209