Last change
on this file was 2, checked in by dmik, 15 years ago |
Imported OpenJDK 6 b19 sources from Oracle.
|
File size:
630 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * @test /nodynamiccopyright/
|
---|
3 | * @bug 6247324
|
---|
4 | * @compile/fail/ref=T6247324.out -XDrawDiagnostics -XDstdout -Xlint -Xlint:-path T6247324.java
|
---|
5 | */
|
---|
6 | class Pair<X,Y> {
|
---|
7 | private X x;
|
---|
8 | private Y y;
|
---|
9 |
|
---|
10 | public Pair(X x, Y y){
|
---|
11 | this.x = x;
|
---|
12 | this.y = y;
|
---|
13 | }
|
---|
14 |
|
---|
15 | public X getX(){
|
---|
16 | return x;
|
---|
17 | }
|
---|
18 | @Seetharam // Undefined annotation...
|
---|
19 | public Y getY(){
|
---|
20 | return y;
|
---|
21 | }
|
---|
22 | }
|
---|
23 |
|
---|
24 | public class T6247324{
|
---|
25 | public void myMethod(){
|
---|
26 | Pair<Integer, String> pair = new Pair<Integer, String>(0, "I am not sure");
|
---|
27 | int intValue = pair.getX();
|
---|
28 | String strValue = pair.getY();
|
---|
29 | }
|
---|
30 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.