aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/test1/CalleeBefore.java
blob: 2e30b31cbc16b85e7210e3c5de9b6b86e7181a60 (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
package test1;

class CalleeBeforeParent {
    static int counter = 0;
    int r;

    CalleeBeforeParent(int k) {
	System.out.println("CalleeBeforeParent:" + k);
	r = counter;
    }
}

public class CalleeBefore extends CalleeBeforeParent {
    public int p;
    public static int q;

    public CalleeBefore() {
	this(3);
    }

    public CalleeBefore(int k) {
	super(k);
	p = q = 0;
    }

    public int m1(int i) {
	return p + i;
    }

    public static int m2(int i) {
	return q + i;
    }

    public int getr() { return r; }

    public int test() {
	return m1(3) + m2(10);
    }
}