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


Please Help Members By Posting Answers For Below Questions

What is an interceptor in java?

548


Which version of my browser should I use? : java security

585


What if I write static public void instead of public static void?

542


Are the actual permissions for the application defined at run-time or compile-time? : java security

612


What is proxy object in java?

647






What do I need to install netbeans?

587


How do I enable javascript?

579


If you’re overriding the method equals() of an object, which other method you might also consider?

593


What is a controller in java?

537


What is stateless class in java?

589


Why is javac not recognized?

562


Explain suspend() method under thread class>

728


How do I install jdk?

533


What is ehcache in java?

581


What is cmp in java?

568