0 votes
in JAVA by
Why main method is static in java?

1 Answer

0 votes
by
Java main() method is always static, so that compiler can call it without the creation of an object or before the creation of an object of the class. In any Java program, the main() method is the starting point from where compiler starts program execution. So, the compiler needs to call the main() method.

Related questions

+1 vote
asked Dec 16, 2020 in JAVA by SakshiSharma
0 votes
asked Jun 16, 2019 in JAVA by reins.robin
...