Why main() method is always static in Class ?
The main() method is static because the JVM needs a single entry point to execute the program without creating an instance of the class.
If main() is not static, then the JVM would require creating an object every time the program starts, leading to unnecessary memory allocation.
Additionally, main() is public to ensure it can be accessed by the JVM from outside the class.