public class ArrayToCollection {
public static void main(String s[]){
int a[]=new int[10];
for(int i=0;i<10;i++){
a[i]=i;
}
for(Integer i:a){
System.out.print(" "+i);
}
}
}
Answer :0 1 2 3 4 5 6 7 8 92.

No comments:
Post a Comment