What is the need to declare main() method as static in Java?
Answer Posted / shadab alam
static keyword specifies that there is no need of instance
to call static method and it's information is contained by
JVM that calls the static method.That's why we declare main
method as static so that it can be called automaticlly.
| Is This Answer Correct ? | 58 Yes | 11 No |
Post New Answer View All Answers
What is the java virtual machine (jvm)?
What is the use of flatmap in java 8?
How do I enable jvm?
Why there are no global variables in java?
What is proxy object in java?
What is maven in java?
What is data persistence in java?
What are orm tools in java?
What is a container in java?
Can the main method be declared final?
What is dto in java?
What is the difference between jar and executable jar?
Where is singleton design pattern used in java?
What is the point of lambda expressions?
What is difference between loosely coupled and tightly coupled in java?