summaryrefslogtreecommitdiff
path: root/libjava/testsuite/libjava.lang/pr133.java
blob: 42009f4c851c0ab127b3477621d354e8f953eb5b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// PR 133

// System.exit(0) appears to hang the program.

public class pr133 {
    public static void main(String argv[])
    {
        String name;

        if (argv.length == 0) {
            name = "Rocket J. Squirrel";
        } else {
            name = argv[0];
        }

        new pr133(name).identifySelf();
        System.out.println("goodbye");

        System.exit(0);
    }

    public pr133 (String name)
    {
        v_name = name;
    }
    
    public void identifySelf()
    {
        System.out.println("This is a pr133 instance named " + v_name);
        System.out.println("Leaving identifySelf()...");
    }

    private String v_name;
}