Qus:    Why is the main method static?
Feb 18, 2021 12:11 1 Answers Views: 427 ROHAN
Prev Next
Answers (1)
JOSHUA Feb 19, 2021 10:54
Answer:   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.

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.

Let`s Connect