Friday, September 27, 2013

Exercise no. 24

package lord1;

import java.util.Arrays;
import javax.swing.JOptionPane;

public class elementarray {
   
    public static void main(String[] args) {
       
        int [] num = {11,200,32,44,5,10,15,20,60};
        String output = "";
        Arrays.sort(num);
       
        for ( int x: num ){
           
            output = output+"\n"+x;
           
        }
       
        JOptionPane.showMessageDialog(null, output);
}

}


No comments:

Post a Comment