So I'm sure I'm missing something obvious, I'm extremely new to programming and my school is online so I'm on my own. Based on my book, this code should work? I keep getting the error
"Syntax Error on tokens, Expression expected instead" //line 11
if (cities [ i ][ j ].charAt (0) =='S')
the "S" is bolded because Eclipse is showing the error there
If someone could point me in the right direction, I would be most appreciative! Thanks!
public class week6{
public static void main (String [] args){
for(int i = 0; i < cities.length; i++){
for (int j = 0; j < cities [ i ] .length; j++){
if(cities[ i ][ j ].charAt(0) == ‘S’)
System.out.println(cities [ i ][ j ]);
}
}
}
}
‘is not a valid quote. Try with'.