summaryrefslogtreecommitdiffstats
path: root/Master/Reference Architectures and Patterns/hjp5/examples/Listing1101.java
blob: 721b190b955119e81b198fc1f9f832dfebb44841 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* Listing1101.java */

public class Listing1101
{
  public static void main(String[] args)
  {
    String s1;
    s1 =  "Auf der Mauer";
    s1 += ", auf der Lauer";
    s1 += ", sitzt \'ne kleine Wanze";
    System.out.println(s1);

    for (int i = 1; i <= 5; ++i) {
      s1 = s1.substring(0,s1.length()-1);
      System.out.println(s1);
    }
  }
}