Quantcast
Channel: Java Syntax error? - Stack Overflow
Browsing all 4 articles
Browse latest View live

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 Article



Answer 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 Article

Answer 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 Article

Java 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
Browsing all 4 articles
Browse latest View live




Latest Images