[ java ] in KIDS 글 쓴 이(By): iknowyou (Coffeeman) 날 짜 (Date): 1997년11월13일(목) 20시24분31초 ROK 제 목(Title): [polymorphism in JAVA]Sort.java public abstract class Sort extends Object { public static void InsertionSort( Comparable[] table ){ for(int i = 1; i < table.length;i++){ int j = i; Comparable x = table[i]; while( j >= 1 && (table[j-1].compare( x ) == 1) ) { table[j] = table[j-1]; j = j - 1; } table[j] = x; } } } class Life extends Object implements Dynamic { Life(Life father, Life mother){} responseToThis(Life this){} responseToOthers(Life others){} } |