Hello World without main method
by ne on 2021-09-29 under Java
Save this program as HelloWorld.java and then run it
NOTE : Only works Pre JDK7
package com.codinglords; /** * Created by navsoni on 8/10/17. */ public class WithoutMain { static { System.out.println("Hello World"); System.exit(0); } }