Here's the code:
public class who{
public static void main(String[] args){
String s = "Who?";
for(int j = s.length() - 1; j >= 0; j--);
System.out.println(s.charAt (j));
}
}
I'm running Dr.Java, and this is the error I get when I compile:
1 error found:
File: C:\Users\Victoria\who.java [line: 5]
Error: C:\Users\Victoria\who.java:5: cannot find symbol
symbol : variable j
location: class who
I cannot seem to figure out what I'm doing wrong here.