aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/test3/MethodRedirectToStatic.java
blob: f1d68e35f1adf1a2b99820b21bd64412ce9ca221 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
package test3;

public class MethodRedirectToStatic {

    public static void main(String[] args) {
        System.out.println(new MethodRedirectToStatic().test());
    }

    int add(int a, int b) {
        return a + b;
    }

    public int test() {
        return add(1, 2);
    }
}

class MethodRedirectToStatic2 {
    public static int add2(MethodRedirectToStatic target, int a, int b) {
        return target.add(a * 10, b * 10);
    }
}