摘要:
JDK1.5之后 如果是static方法则可以直接调用方法: 范例: class Mytest { public static int add(int x , int y) { return x + y ; } public static int div(int x, int y){ return 阅读全文
posted @ 2016-01-29 22:06
式微胡不归
阅读(131)
评论(0)
推荐(0)
摘要:
从JDK1.5之后增加的foreach循环取消索引 for(类型 变量 : 数组 | 集合){ 每一次循环会自动将数组内容设置给变量 } 范例: int [] i = {1,2,3,4} ; for(int x : i){ System.out.println(x) ; } ArrayList <S 阅读全文
posted @ 2016-01-29 21:57
式微胡不归
阅读(138)
评论(0)
推荐(0)

浙公网安备 33010602011771号