Class doesn’t have a main method (Traffic Light)

Your question have the answer, you don’t have a main method in your code/class which you are trying to execute.

As you mentioned in your comment you are new to java use IDEs like Eclipse, Netbeans or IntelliJ IDEA where they gives you proper warnings and hints.

Leave a Comment