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 @qualifier in java?
What is native class in java?
Who developed rxjava?
How can c# app request minimum permissions? : java security
Java prints out a ton of digits when I system.out.println() a double. How can I format it so it displays only 3 digits after the decimal place?
In system.out.println(), what is system, out and println?
What is the difference between the boolean & operator and the && operator?
What is spliterator in java se 8?
What is meant by java se?
What is an interceptor in java?
What gives java it’s “write once and run anywhere” nature?
What are tlds in java?
What is the java virtual machine (jvm)?
What is jpa entitymanager?
I run a web server. Am I at risk? : java security