class Test{ public static void main(String[] args) throws IOException{ double[] num = new double[]{1.2,4.5,2.4,5.5}; for(int i=0; i for(int j=i+1; j if( num[j] double temp = num[i]; num[i] = num[j]; num[j] = temp; } } } for(int i=0;i System.out.println(num[i]); } }}