Write a java class which consists of 5 integer data. Overload constructor ( Default & normal) to initialize those integer data members. Provide a method which sorts those integer data members using bubble sort

Write a java class which consists of 5 integer data.
 Overload constructor ( Default & normal) to initialize those integer data members.
 Provide a method which sorts those integer data members using bubble sort

class num{
    int a1,a2,a3,a,a4,a5;
    num(){

    }
    num(int b1,int b2,int b3,int b4,int b5){
        a1=b1;
        a2=b2;
        a3=b3;
        a4=b4;
        a5=b5;
      }
    void sort(){
        int[] bub=new int[5];
        int temp;
        a1=bub[0];
        a2=bub[1];
        a3=bub[2];
        a4=bub[3];
        a5=bub[4];
        for(int i=0;i<5;i++)
        {
            if(bub[i]>bub[i+1]){
               temp=bub[i];
               bub[i]=bub[i+1];
               bub[i+1]=temp;
            }
        }
        for(int j=0;j<5;j++)
        {
            System.out.println(bub[j]);
        }
    }
}
public class as10 {
    public static void main(String arg[]){
        num ob1=new num();
        num ob2=new num(9,3,7,8,2);
        ob2.sort();
    }
}