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
How to create a thread in java?
What is use of valueof () in java?
What is meant by tab pans?
What is a singleton in genetics?
Why method overriding is used?
what do you understand by the term string with respect to java?
What are the advantages of autoboxing?
What is variable explain with example?
What do you mean by synchronized non access modifier?
How do you identify if jvm is 32-bit or 64-bit from java program?
What is the difference between a switch statement and an if statement?
What is internal variable?
What restrictions are placed on method overloading?
Mention the default values of all the elements of an array defined as an instance variable.
What is a dynamic array java?