Basic HTML version of Foils prepared 17 Nov 97

Foil 22 More on Strings and the StringBuffer Class

From Java Tutorial, July 1, 1996 CEWES Tutorial, CPS606, JSU Class CSC499 -- July 22-25 1997, Fall 97. by Nancy J. McCracken,Geoffrey C. Fox, Tom Scavo


1 String comparison is done with the methods equals() and equalsIgnoreCase(). Note that == tests if two strings are the same string instance, while equals() tests if two distinct strings have the same characters.
2 Other methods include length(), charAt( int ) and toLowerCase().
3 The StringBuffer class has mutable strings, but with a fixed maximum size. Methods such as append(...) automatically extend the length of the string.

in Table To:


© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed Apr 1 1998