标签:i+1 ref play rgs iter ring static oid sys
终于弄好了
public static void main(String[] args) {
int[] arr={1,2,3,5,6,8,9,10,11,11,12,13,14,15};
for(int i=0;i<arr.length-1;i++){
//0 1 2 3 4 5 6 7
int temp=arr[i]+1;
//2 3 4 5 6 7
System.out.print(arr[i]+",");
if(temp!=arr[i+1]){
System.out.println();
}
}
System.out.println(arr[arr.length-1]);
}
标签:i+1 ref play rgs iter ring static oid sys
原文地址:http://www.cnblogs.com/zengjm/p/6885710.html