Sort a double array.

import java.util.Arrays;

public class Hello {

public static void main(String[] args) {

double k[]={1.2,2.2,1.3,3.4,1.4};

Arrays.sort(k);

for(int i=0;i

System.out.println(k[i]);

}

}

}


No comments: