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
What is the difference in between cpp and java? Can u explain in detail?
Why enumeration is faster than iterator?
How do you format in java?
What is OOP Language?
What are constructors in java?
What is main difference between variable and constant?
How you can force the garbage collection?
How to create a base64 decoder in java8?
Is int primitive data type?
What is immutable class in java?
What is the difference between a choice and a list?
Can we have any other return type than void for main method?
What exactly is a .class file?
Define jit compiler?
Does java allow default arguments?