命令模式
摘要:
package frank;public class App{ public static void main(String[] args) { int[] array = new int[]{0,1,4,5,3,4}; ProcessArray pa = new ProcessArray(); pa.process(array,new PrintCommand());//相同的方法,不同的输出 pa.process(array,new AddCommand());//相同的方法,不同的输出 }}interface Command{ public abstract void proce... 阅读全文
posted @ 2013-08-07 16:20 wp456 阅读(162) 评论(0) 推荐(0)
浙公网安备 33010602011771号