September 2005
Beginner
576 pages
13h 6m
English
In addition to creating strings, pasting them together, and using them with other types of variables, there are several different ways you can examine a string variable and change its value. These advanced features are possible because strings are objects in the Java language. Working with strings develops skills you'll be using to work with other objects later.
One thing you will be testing often in your programs is whether one string is equal to another. You do this by using equals() in a statement with both of the strings, as in this example:
String favorite = "piano"; String guess = "ukelele"; System.out.println("Is Ada's favorite instrument a " + guess + "?"); System.out.println("Answer: " ...Read now
Unlock full access