public static void main(String[] args) {
int[] a={1,2,3,4,5,6,7,8,9};
List list=new ArrayList();
String s="";
for(int i=0;i
if(i%3==2){
s+=String.valueOf(a[i]);
list.add(s);
s="";
}else{
s+=String.valueOf(a[i]);
}
}else{
s+=String.valueOf(a[i]);
}
}
for(int i=0;i
}
}