// Demonstrate String arrays.
class StringArrays
{
  public static void main(String[] args)
  {
    String str[] = { "This", "is", "a", "test." };

    System.out.println("Original array: ");
    for(int i=0; i < str.length; i++)
      System.out.print(str[i] + " ");
    System.out.println("\n");

    // change a string
    str[1] = "was";
    str[3] = "test, too!";

    System.out.println("Modified array: ");
    for(int i=0; i < str.length; i++)
      System.out.print(str[i] + " ");
  }
}
