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 entry in java?
Why are functions called methods in java?
I want to print “hello” even before main is executed. How will you acheive that?
Explain the difference between collection api and stream api in java8?
Are floats faster than doubles?
What are the fileinputstream and fileoutputstream?
Is 9 a prime number?
Is oracle java 11 free?
What is high level language in computer?
What is not object oriented programming?
What is an 8 bit word?
What are streams in java 8?
What ide should I use for java?
Why is the type for real numbers called double?
What is console based application in java?