CS 1054: Laboratory Exercise 9

Objective

This exercise is to familiarize you with some of the String methods in Java as well as the concepts of cascading and composition.

To Receive Credit

Show the TA your working program before leaving class.

Activities

  1. Within Eclipse, create a new Project and call it Lab9. Within it, create a class called StringMethods.
  2. In Java, the String class has several methods. The ones we will use in this exercise are:
    1. toUpperCase
    2. toLowerCase
    3. length
    4. trim
    5. concat
    6. substring
    If you need more help with these methods, you can always refer to the Java API documentation.

© Mir Farooq Ali 2005.