Basic HTML version of Foils prepared 18 May 97

Foil 19 More on Strings, and the StringBuffer class

From Java Tutorial - Spring 1997 Part 4: Multithreading, useful Java classes, I/O, Networking, and the future Peking Tutorial, Web Certificate -- Spring-Summer 1997. by Nancy J. McCracken,Geoffrey C. Fox


1 String comparison can be done with the methods equals and equalsIgnoreCase. Note that == tests if two strings are the same string instance, while equals tests if two different strings have the same characters.
2 Other methods include length, CharAt and toString.
3 The StringBuffer class has mutable strings, but is created with a fixed maximum size. It has methods such as append to 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 Thu Jan 8 1998