Created
May 12, 2021 07:36
-
-
Save pj8912/40f38ee5cf0a64fec4b4e349646b7b52 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
why main method is static? | |
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. ... So, the compiler needs to call the main() method. If the main() is allowed to be non-static, then while calling the main() method JVM has to instantiate its clas |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment