Quantcast
Viewing all articles
Browse latest Browse all 15

What is the need to declare main() method as static in Java?

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.

Viewing all articles
Browse latest Browse all 15

Trending Articles