int[] array = new int[]{5,8,2,3};for(int i=0;i for(int j=i+1;j if(a[i] int t = a[i]; a[i] = a[j]; a[j] = t; } }}