0
Why there are many curly brackets at the end?
public class FirstCode { public static void main(String args[]) { int age = 19; int money = 600; if (age > 18) { if (money > 500) { System.out.print("Welcome"); } } } } Usually there are not many curly brackets at my first code. But now the eclipse software showing errors. In order to fix this you need to put more curly brackets at the end. Why this happen?
2 Respostas
+ 1
Every block that opens with an {, also needs a closing }.
Most often, you just have forgotten one somewhere.