📄 client.java.svn-base
字号:
package org.hyq.observer0;
public class Client {
public static void main(String[] args) {
DataSubject bag = new DataSubject();
DataObserver1 do1 = new DataObserver1(bag);
DataObserver2 do2 = new DataObserver2(bag);
// adder and printer add themselves to the bag
System.out.println("About to add another integer to the bag:");
bag.add("aNewCar");
System.out.println();
System.out.println("About to remove an integer from the bag:");
bag.remove(0);
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -