Home C C++ Java Python Perl PHP SQL JavaScript Linux Selenium QT Online Test

Home » Forum » x-Forum » Question

Why is the main method static?

Because the object is not needed to call the static method. If we don't make the main method static, JVM must first create its object and then call the main () method, which leads to additional memory allocation.

Posted by preetiagarwal 2019-06-03 23:42:17

No Ans Posted

Please login to comment

Log In

Ask New Question