/* Write a java program to declare a class with 5 integers.USe an Instance method to rearrange the nimbers so that the first instance variable refers to the smallest the second to the next larger and so on. AIM:To create three different threads where each thread collects different information and outputs all the details together */ class mathdemo { int a[]=new int[5]; void insmath(int i,int j,int k,int l,int m) { this.a[0]=k; this.a[1]=m; this.a[2]=i; this.a[3]=l; this.a[4]=j; for(int x=0;x<4;x++) { for(int y=x+1;y<=4;y++) { if (a[x]<=a[y]) continue; int temp=a[x]; a[x]=a[y]; a[y]=temp; } } for(int z=1;z<=5;z++) System.out.println("The value no "+z+"is"+a[z-1]); } public static void main(String args[]) { mathdemo m =new mathdemo(); m.insmath(10,50,14,4,2); } }