main.java
来自「codebook!」· Java 代码 · 共 19 行
JAVA
19 行
import java.util.*;/** Part of a main program using Shape objects */public class Main { Collection allShapes; // created in a Constructor, not shown /** Iterate over all the Shapes, getting their areas */ public double totalAreas() { Iterator it = allShapes.iterator(); double total = 0.0; while (it.hasNext()) { Shape s = (Shape)it.next(); total += s.computeArea(); } return total; }}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?