Java treats that as a String concatenation. You need nested braces:
System.out.println("Recored number: " + (i+1) + " is:");
Type: Posts; User: PhHein
Java treats that as a String concatenation. You need nested braces:
System.out.println("Recored number: " + (i+1) + " is:");