4e3d2620d8b15eb6611e2443e1a2c145847f5792
[mate.git] / tests / Generics1.java
1 package tests;
2
3 public class Generics1 implements Cmp<Integer> {
4         public Integer a = new Integer(0x1337);
5         public int cmpto(Integer o) {
6                 return a.intValue() - o.intValue();
7         }
8
9         public static Cmp<Integer> sb = new Generics1();
10
11         public static void main(String []args) {
12                 Generics1 foo = new Generics1();
13                 System.out.printf("0x%08x\n", foo.cmpto(0x666));
14                 System.out.printf("0x%08x\n", sb.cmpto(0x666));
15         }
16 }
17
18 interface Cmp<T>
19 {
20         int cmpto(T o);
21 }