mirror of
https://github.com/CyC2018/Interview-Notebook.git
synced 2026-11-19 22:03:47 +00:00
Update 设计模式 - 观察者.md
示例代码补上 import。
This commit is contained in:
@@ -30,6 +30,9 @@ public interface Subject {
|
||||
```
|
||||
|
||||
```java
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class WeatherData implements Subject {
|
||||
private List<Observer> observers;
|
||||
private float temperature;
|
||||
|
||||
Reference in New Issue
Block a user