why does this code show the ouput
[I@10b62c9
[I@10b62c9
[I@10b62c9
[I@10b62c9
[I@10b62c9
[I@10b62c9
[I@10b62c9
if you could fix it i wouild appreciate it
Code:public static void swap(int[]a) { int i,n,atemp; for(n=1;n<a.length;n++) { atemp=a[n]; i=n; while(i>0&&atemp<a[i-1]) { i--; } a[i]=atemp; } } public static void main(String[]args) { int[]array={10,7,8,1,3,9,4}; swap(array); for(int i=0;i<array.length;i++) System.out.println(array); }


Reply With Quote


Bookmarks