True/False: cityName == “Rock Island” will compare the characters stored in the String variable cityName with the characters in the String literal “Rock Island”.
False, Dr. Mueller covered this in class the other day. The == compares the location that the string is stored in memory so it would be comparing cityName to the new string "Rock Island" that is stored in two different locations of Java.
Thank you!
False because you can't put == for a string instead cityName.equals("Rock Island")