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 are three ways in which a thread can enter the waiting state in java programming?

686


What is classes in java?

523


How to display all the prime numbers between 1 and 100

509


What is the difference between length and length() method in java?

652


How do I stop concurrentmodificationexception?

513






Which variables are stored in stack?

453


What are thread safe functions?

516


Why is it called a string?

569


What is the difference between preparedstatement and statement in java?

556


What is update method called?

667


Hi Anyone know the model / questions of the Federal bank sample questions for the post of Specialist Officers - Programmers. Please post if anyone have..

1826


What is linkedlist in java?

512


Can an arraylist be empty?

568


What is the java project architecture?

1789


What is externalizable?

622