created 6/15/98; revised 09/05/99, 06/12/00

CHAPTER 29 --- Strings and Object References

In previous examples, method parameters were primitive data types, like int, or double:

Point pt = new Point();
pt.move( 14, 22 );

This chapter discusses how object references are used as parameters. The class String will be used in many of the examples.

Chapter Topics:

  • String literals.
  • The null value.
  • More about garbage.
  • The String class.
  • String concatenation.
  • Strings are immutable.
  • Some String methods.
  • Cascading methods.

QUESTION 1:

(Review:) What TWO things does the following statement do?

String zeta = new String( "The last rose of summer." );
Click Here after you have answered the question