Completion requirements
The String class is used for text manipulation. As you read, you will learn different ways to create Strings, methods to manipulate Strings, the String concatenation operator '+', and about how Strings are immutable.
27. End of the Chapter
Answer:
Both start with the same letters.
" MY LOVE".trim().toLowerCase()
creates the temporary string "my love" .
"burns.toLower()
creates the temporary string "my love is like a red, red rose."
Both strings start out the same.
End of the Chapter
End of the Chapter
That was a complicated question. I hope you rose to the occasion. If you got burned, review the example. You may wish to review the following.
- An String, construction easy way to construct a String.
- The null null value.
- How an object becomes garbage garbage.
- String, documentation
String
class description. - String String concatenation concatenation.
- Shorthand String concatenation, shorthand notation notation for
String
concatenation. - Strings as immutable object immutable objects.
- overloaded Overloaded operators.
- length, of a String Length of a string.
- charAt() charAt() method
- substring Substrings
- The trim()
trim()
method. - The startsWith()
startsWith()
method. - cascade Cascaded operation