// ********** AdapterDemo.java ********** interface TargetIF { public void newOperation(); } class Adaptee { public void legacyOperation() {} } class Adapter implements TargetIF { Adaptee adaptee = new Adaptee(); public void newOperation() { adaptee.legacyOperation(); } } public class AdapterDemo { private static final int MAX = 1000; public static void main(String args[]) { long t1 = System.currentTimeMillis(); for (int i=0; i