emptyballlist.java
来自「书籍"Java_面向事件编程"的附带光盘代码」· Java 代码 · 共 25 行
JAVA
25 行
import objectdraw.*;// An empty list of balls. This implements the ball list// interface, but only the isEmpty method should be used.public class EmptyBallList implements BallListInterface { public EmptyBallList() {} public boolean isEmpty() { return true; } // return null as a default value public FilledOval getFirst() { return null; } // return null as a default value public BallListInterface getRest() { return null; } }
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?