Thu, 31 Aug 2017 15:17:03 +0800
merge
aoqi@0 | 1 | /* |
aoqi@0 | 2 | * @test /nodynamiccopyright/ |
aoqi@0 | 3 | * @bug 6247324 |
aoqi@0 | 4 | * @compile/fail/ref=T6247324.out -XDrawDiagnostics -Xlint -Xlint:-path T6247324.java |
aoqi@0 | 5 | */ |
aoqi@0 | 6 | class Pair<X,Y> { |
aoqi@0 | 7 | private X x; |
aoqi@0 | 8 | private Y y; |
aoqi@0 | 9 | |
aoqi@0 | 10 | public Pair(X x, Y y){ |
aoqi@0 | 11 | this.x = x; |
aoqi@0 | 12 | this.y = y; |
aoqi@0 | 13 | } |
aoqi@0 | 14 | |
aoqi@0 | 15 | public X getX(){ |
aoqi@0 | 16 | return x; |
aoqi@0 | 17 | } |
aoqi@0 | 18 | @Seetharam // Undefined annotation... |
aoqi@0 | 19 | public Y getY(){ |
aoqi@0 | 20 | return y; |
aoqi@0 | 21 | } |
aoqi@0 | 22 | } |
aoqi@0 | 23 | |
aoqi@0 | 24 | public class T6247324{ |
aoqi@0 | 25 | public void myMethod(){ |
aoqi@0 | 26 | Pair<Integer, String> pair = new Pair<Integer, String>(0, "I am not sure"); |
aoqi@0 | 27 | int intValue = pair.getX(); |
aoqi@0 | 28 | String strValue = pair.getY(); |
aoqi@0 | 29 | } |
aoqi@0 | 30 | } |