Why Is Method main Declared static?
It is declared static so that the compiler can call it directly without creating the new object. The main method is the starting point of the compilation of the program. Hence it is compulsory to call main method.
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments
Leave a comment