+ 1

Why the main method is static?

15th Aug 2016, 1:02 AM
Ys (äž¶äŸæł“)
Ys (äž¶äŸæł“) - avatar
2 Answers
+ 4
Because for Static method execution therevis no need of Object creation. Main method is entry point of the programme. if main method would not static every time we have to create object for it.
15th Aug 2016, 6:56 AM
AKSHAY MALVIYA
AKSHAY MALVIYA - avatar
0
For the JVM to call without setted a object .
15th Aug 2016, 1:11 AM
Ys (äž¶äŸæł“)
Ys (äž¶äŸæł“) - avatar