java - Main method empty? -
i have class implements runnable, eclipse needs public static void main method in it. ok if main completly empty?
public class launcher implements runnable{ private string message; public launcher(string message) { this.message= message; } public static void main(string[] args) { } @override public void run() { //my implementations }
if intend launcher
main class of application, 1 use start it, main method needed , must whatever should done start work.
if not, delete main method. eclipse not require main method unless start application telling run class. optionally generate 1 when creating class, can edited out if not needed.
Comments
Post a Comment