So I was trying to figure out how this snake game works:
http://zetcode.com/tutorials/javagamestutorial/snake/
When I copied the code into a compiler, I got many errors in this one block of code:
public static void main(String[] args) {
EventQueue.invokeLater(() -> {
JFrame ex = new Snake();
ex.setVisible(true);
});
}
}
Here are the errors: (Line 27 is the EventQueue.invokeLater line)
Error: illegal start of expression (Line 27)
Error: illegal start of expression (Line 27)
Error: illegal start of expression (Line 27)
Error: ';' expected (Line 27)
Error: illegal start of type (Line 30)
Error: class, interface, or enum expected (Line 32)