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 between a constructor and a method?
What is time complexity java?
What is assembly condition codes?
Why is java so popular?
Which method returns the length of a string?
Write a regular expression to validate a password. A password must start with an alphabet and followed by alphanumeric characters; its length must be in between 8 to 20.
How to do encapsulation in java?
What is private protected in java?
What is use of arraylist in java?
Where is java located?
What is multiple inheritance? Is it supported by java?
How do you detect memory leaks?
Which is the best approach for creating thread ?
What is set string?
What is data and its types?