class Birne{} class Apfel implements Comparable<Birne>{ public int compareTo(Birne b){return 0;} public static void main(String [] _){ Apfel a=new Apfel(); Birne b=new Birne(); System.out.println(a.compareTo(b)); //System.out.println(a.compareTo(a)); } }