0
Why is the main method static?

Open 1 Answers 40 Views Education
Why is the main method static?

1 Answer

0

Why is the main method static?

Because the object is not required to call the static method. If we make the main method non-static, JVM will have to create its object first and then call main() method which will lead to the extra memory allocation. More Details.

by (52.6k points)
...