Answer by DoubleMa for Java Syntax error?
Like other has mentioned use ' instead of ’ and ‘.Or use if (cities[i][j].startsWith("S")) instead of if (cities[i][j].charAt(0) == 'S').public class week6 { private static String[][] cities =...
View ArticleAnswer by destraaaa for Java Syntax error?
Try changing your aphostrophe with 'So it would bepublic class week6 { public static void main (String[] args) { for ( int i = 0; i < cities.length; i++ ) { for ( int j = 0; j < cities [ i ]...
View ArticleAnswer by Spikatrix for Java Syntax error?
Replace if ( cities [ i ][ j ].charAt ( 0 ) == ‘S’ ) withif ( cities [ i ][ j ].charAt ( 0 ) == 'S' )‘ and ’ are different from '. The compiler complains because it doesn't recognize the curly...
View ArticleJava Syntax error?
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...
View Article
More Pages to Explore .....