String
s charAt()
method of String
StringBuffer
This chapter discusses the StringBuffer
class,
which is
useful for processing character data.
The class String
alone could be used for this,
but the StringBuffer
class
is often faster and more convenient.
Although the StringBuffer
class is sometimes useful,
it is
not essential.
It is not covered in the AP Java computer science test
and is not used further in these chapters.
(Review: ) Examine the following code:
String data = new String("Turtle"); data = data + 's' ;
Does the last statement construct a new String
?