import java.io.*;
import java.util.Arrays;
public class r
{
public static void main(String args[])
{
int n;
String[] names =new String[30];
InputStreamReader isr=new InputStreamReader(System.in);
BufferedReader br=new BufferedReader(isr);
try
{
System.out.print("enter limit:");
n=Integer.parseInt(br.readLine());
for(int i=0;i<n;i++)
names[i]=br.readLine();
Arrays.sort(names);
System.out.println(Arrays.toString(names));
}catch(IOException e){}
}
}
Jessurider
-10
Posting Whiz in Training
Recommended Answers
Jump to PostIf you can't even be bothered to post the exception, then why should anyone waste their time trying to figure out what's wrong with this for you?
Jump to Posti've put the exception ..............
No, you haven't.
Jump to PostCheck my post, i already solved your matter. At least i deserve a positive point. ;-)
All 12 Replies
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
Majestics
84
Posting Pro
Jessurider
-10
Posting Whiz in Training
Ezzaral
2,714
Posting Sage
Team Colleague
Featured Poster
Majestics
84
Posting Pro
Jessurider
-10
Posting Whiz in Training
Jessurider
-10
Posting Whiz in Training
Majestics
84
Posting Pro
Jessurider
-10
Posting Whiz in Training
Majestics
84
Posting Pro
Jessurider
-10
Posting Whiz in Training
NormR1
563
Posting Sage
Team Colleague
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.