[ java ] in KIDS 글 쓴 이(By): iknowyou (Coffeeman) 날 짜 (Date): 1997년11월13일(목) 20시24분02초 ROK 제 목(Title): [polymorphism in JAVA]Comparable.java // Comparable interface public abstract interface Comparable { //return -1 if this object is smaller than //return 0 if this object is equal to //return 1 if this object is bigger than //c, a instance of class which implements Comparable public abstract int compare(Comparable c); } class Life extends Object implements Dynamic { Life(Life father, Life mother){} responseToThis(Life this){} responseToOthers(Life others){} } |