I've often pondered over this subject. I know the main method has a special signature the JVM looks for, but why is it static?
Java Language specification (second edition) section 12.1.4: [quote] 12.1.4 Invoke Test.main Finally, after completion of the initialization for class Test (during which other consequential loading, linking, and initializing may have occurred), the method main of Test is invoked. The method main must be declared public, static, and void. It must … Read More
Edited by happygeek: fixed formatting
Are you able to help answer this sponsored question?
Questions asked by members who have earned a lot of community kudos are featured in order to give back and encourage quality replies.