import java.util.*;
import java.lang.*;
import java.io.*;

// The main method must be in a class named "Main".
class Main {
    public static void main(String[] args) {
        int[] a = {1000,34,55,77,88, 23,11};
        for(int i=0;i<a.length;i++){
            for(int j=i+1;j<a.length;j++){
                if(a[i]>a[j]){
                int temp =a[i];
                a[i]=a[j];
                a[j]=temp;
                }
            }
        } 
       for (int i = 0; i < a.length; i++) 
           {     
              System.out.println(a[i]);  
           }}
}

Embed on website

To embed this program on your website, copy the following code and paste it into your website's HTML: