Need to use public,static keywords in main function?

Answer Posted / suresh

Main method is called by jvm...
jvm is out side the class
so main method must be pulic
then only jvm can access.

No instance of the class is needed to
execute the static method.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is meant by anonymous class?

598


What is t in generics in java?

565


What is java reflection?

541


How to obtain a performance profile of java program

547


What is the set interface in java programming?

632






What is thread life cycle in java?

586


What is append function?

572


How to instantiate member inner class?

630


Which collections are thread safe in java?

484


What is static import?

604


What is java in layman terms?

531


We are seeing so many videos/audios as many web sited. But question is these videos or audios are stored in Databases ( Oracle, Mysql, Sybase,... ) or stored any file directory from there they will give the link for that? Pls explain and give sample code to achieve this one? Thanks, Seenu.

1494


Can we use a switch statement with strings?

554


How do you input a string in java?

505


Difference between final and effectively final ?

641