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
Write a program to reverse a number in java?
What is Java Reflection API? Why it’s so important to have?
What is the maximum size of a string in java?
What are the files generated after using IDL to java compiler?
Differentiate between stringbuffer and stringbuilder in java.
What are the features in java?
What are class members by default?
Give some features of interface?
What is a protected class in java?
What is command line used for?
Is array a class?
What is class forname used for?
What is a parameter in a function?
Can java hashmap have duplicate keys?
In java, how many ways you can take input from the console?