What happens when a main method is declared as private?

Answer Posted / subha narayan mohapatra

it will generate an error message because main() method is
the start or execution point in our java program.

Is This Answer Correct ?    4 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the protected method modifier?

557


Is main is a keyword?

569


Why string objects are immutable in java?

557


What does null mean in java?

619


Does chrome use java?

508






What is the size of a string in java?

536


Explain why wait(), notify() and notifyall() methods are in object class rather than in thread class?

546


What are 5 boolean operators?

612


What is a hashmap used for?

635


What is boolean example?

522


Which is better 64 bit or 32 bit?

497


There are two classes named classa and classb. Both classes are in the same package. Can a private member of classa can be accessed by an object of classb?

985


What are keywords and reserved words in java?

549


What is a byte array?

578


Who developed java?

556