Need to use public,static keywords in main function?
Answer Posted / anjani kumar jha
public is used because from anywhere u r able to call ur
main method
static-static is the entry point of main function which is
executing by jvm(at run time) in other word signature of
the main function.
| Is This Answer Correct ? | 12 Yes | 1 No |
Post New Answer View All Answers
Does printwriter create a file?
Can an interface have a constructor?
What are the different types of data structures in java?
What is the difference between declaration and definition in java?
What are inner classes or non static nested classes in java?
What is the meaning of course?
How define set in java?
A non-static inner class may have object instances that are associated with instances of the class’s outer class. A static inner class does not have any object instances.
Explain the difference between abstract class and interface in java?
Can singleton class be inherited in java?
Difference between this() and super() in java ?
Is java 9 released?
What is meant by nested loop?
is there a separate stack for each thread in java? : Java thread
What is main method?