summaryrefslogtreecommitdiff
path: root/tutorial/examples/copy/TestShadow.java
blob: dc07b669c8cdd7f3a6c96f7b130a4266c0b42755 (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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * This code was generated by ojc.
 */

package examples.copy;


public class TestShadow extends java.awt.Panel
{

    private int iii = 0;

    private examples.copy.Test n = null;

    private java.lang.String str = "string";

    public TestShadow()
    {
        super();
    }

    /**
     * @param  
     * @return  
     * @exception  
     * @see java.lang.Object
     */
    public static void main( java.lang.String[] argv )
    {
        java.io.PrintStream out = java.lang.System.out;
        java.io.PrintStream error = java.lang.System.err;
        out.println( "Hello" + " " + "World" );
        examples.copy.Test n = new examples.copy.Test();
        java.lang.System.err.println( "done. " );
        examples.copy.Test test = new examples.copy.Test();
        test.foo();
    }

    public TestShadow( java.lang.String str )
    {
        this.str = str;
        n = null;
    }

    public int foo()
    {
        return iii;
    }

    public java.lang.String toString()
    {
        if (n == null) {
            return str;
        }
        return str + n;
    }

}