What happens when a main method is declared as private?

Answer Posted / harsha

When a method is declared as private, the program compiles
properly but it will give runtime error ?Main method not
public"

Is This Answer Correct ?    111 Yes 8 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between java applets and applications?

843


What is a copy constructor in java?

814


What is a line separator in java?

738


How do you get length in java?

783


What are the different data types in java?

749


Is java an open source?

731


Why arraylist is used in java?

764


What is sleep method?

813


What is an inner class in java?

717


Name few java 8 annotations ?

791


What about features of local inner class?

837


What are different types of multitasking?

731


Write a java program for binary search?

797


What is r in java?

787


What is boolean law?

724