*********************************************************************
COMPLETE SOURCE CODE FOR : AscendingString.java
*********************************************************************
import java.util.Scanner;
public class AscendingString
{
public static void main(String[]args)
{
Scanner s=new Scanner(System.in);
String[]a=new String[5];
for(int i=0;i<5;i++)
{
System.out.println(i+1+".Put your String");
String temp=s.nextLine();
a[i]=temp;
}
System.out.println("**********");
System.out.println("RESULT");
System.out.println("**********");
for(int i=0;i<5;i++)
{
for(int j=0;j<5;j++)
{
String temp=a[i];
String tempB=a[j];
if(temp.compareTo(tempB)<0)
{
a[i]=tempB;
a[j]=temp;
}
}
}
for(int i=0;i<5;i++)
{
System.out.println(a[i]);
}
}
}
*********************************************************************
JUST COMPILE AND EXECUTE IT
*********************************************************************