摘要: //产生4个普通窗口 for(int i=1;i<5;i++){ ServiceWindow window = new ServiceWindow(); window.setNumber(i); window.start(); } //产生1个快速窗口 ServiceWindow expressWindow = new ServiceWindow(); expressWindow.setType(CustomerType.EXPRESS); expressWindow.start(); //产生1个VIP窗口 ServiceWindow vipW... 阅读全文
posted @ 2012-03-30 12:00 微明 阅读(142) 评论(0) 推荐(0)
摘要: public enum Lamp { /*每个枚举元素各表示一个方向的控制灯*/ S2N("N2S","S2W",false),S2W("N2E","E2W",false),E2W("W2E","E2S",false),E2S("W2N","S2N",false), /*下面元素表示与上面的元素的相反方向的灯,它们的“相反方向灯”和“下一个灯”应忽略不计!*/ N2S(null,null,false),N2E(null,null,fal 阅读全文
posted @ 2012-03-30 11:32 微明 阅读(137) 评论(0) 推荐(0)
摘要: import static java.lang.Math.*; //静态导入 public class StaticImport { public static void main(String[] args) { System.out.println(Math.max(3, 6)); System.out.println(Math.abs(3 - 6)); }} System.out.println(add(2,3,5)); //重载 } public static int add(int... 阅读全文
posted @ 2012-03-30 09:48 微明 阅读(197) 评论(0) 推荐(0)