- 0
- 0
- 约5.2千字
- 约 18页
- 2017-08-19 发布于广东
- 举报
* * * * * 第11章 列举型态 常数设置与列举型态 定义列举型态 常数设置 可使用接口来定义操作时所需的共享常数 public interface ActionConstants { public static final int TURN_LEFT = 1; public static final int TURN_RIGHT = 2; public static final int SHOT = 3; } 常数设置 public void someMethod() { .... doAction(ActionConstants.TURN_RIGHT); .... } public void doAction(int action) { switch(action) { case ActionConstants.TURN_LEFT: System.out.println(向左转); break; case ActionConstants.TURN_RIGHT: System.out.println(向右转); break; case ActionCon
您可能关注的文档
- IT职业英语电子教案高巍巍 Unit11 The Development Environment 11 1 reading.ppt
- IT职业英语电子教案高巍巍 Unit11 The Development Environment 11 2 listening.ppt
- IT职业英语电子教案高巍巍 Unit11 The Development Environment 11 3 speaking.ppt
- IT职业英语电子教案高巍巍 Unit11 The Development Environment 11 4 writting.ppt
- IT职业英语电子教案高巍巍 Unit12 New Technology 12 1 reading.ppt
- IT职业英语电子教案高巍巍 Unit12 New Technology 12 2 listening.ppt
- IT职业英语电子教案高巍巍 Unit12 New Technology 12 3 speaking.ppt
- IT职业英语电子教案高巍巍 Unit12 New Technology 12 4 writting.ppt
- IT职业英语电子教案高巍巍 YFGrammar 语法 unit1 Tenses时态.ppt
- IT职业英语电子教案高巍巍 YFGrammar 语法 unit2 Passive voice被动语态.ppt
原创力文档

文档评论(0)