摘要: 1.else子句与同一块中离得最近的未匹配if子句相匹配2.System.exit(0); 该方法为静态方法,调用这个方法可终止程序,参数0表示程序正常结束3.Math.random(); 返回一个随机双精度值D,如:0.0≤D<1.0使用例子: (int)(Math.random()*10) 返回一个随机一位整数(0~9)4.switch语句 switch(swith-expression) swith-expression:必须能计算出一个char,byte,short或int值 { case value1:statement(s)1; value必须... 阅读全文
posted @ 2012-03-01 00:14 KeenLeung 阅读(226) 评论(0) 推荐(0) 编辑