class asc
{
public static void main(String arg[])
{
int a[] = {4,2,1,3,7};
int i,j,t;
for(i=0;i<5;i++)
{
for(j=i+1;j<4;j++)
{
if (a[i]>a[j])
{
t = a[i];
a[i] = a[j];
a[j] = t;
}
}
}
for(i=0;i<5;i++)
{
System.out.println(a[i]);
}
}
}In this blog I will explain about Ascending Order Program in Java. It is very simple in Java Programming. The output will be displayed in the Run module.
