Need to use public,static keywords in main function?
Answer Posted / aravinda reddy
1) Public access modifier specifies class declared can be
accesses from anywhere
2) where as static refers with out creating instance of the
class JVM should access the main class while executing.
3) void specified main function should not return any value
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can we sort hashmap in java?
what do you mean by classloader?
Which is the best approach for creating thread ?
What is java lang object?
What is java util function?
What is a ternary operator in java?
what is mutual exclusion? : Java thread
What is close method? How it's different from Finalize & Dispose?
What is a condition in programming?
Why Do I Get A "permission Denied" Error After Downloading The .jnlp Java Launcher For The Vkvm?
What is immutable class in java?
When should the method invokelater() be used?
What is communist flag?
Is a copy constructor?
Difference between error and exception