import java.io.*;
public class homework{
public static void main(String[] args) throws IOException{
BufferedReader sulat = new BufferedReader (new FileReader("pakshit"));
String ian;
String[] jiji = new String[4];
int i = 0;
while ((ian = sulat.readLine()) != null ){
String moo;
char mqq;
mqq = ian.charAt(0);
moo = Character.toString(mqq);
jiji[i++] = moo;
int val = (int)mqq;
System.out.println(val);
}
}
}
____
pakshit textfie contains:
Justin
Nadine
Adrian
Vincent
___
it prints the converted first letters to its coresponding number:
74
78
65
86
____
my prob is how to sort these numbers in ascending order and print the coresponding name also in ascending order which will now print:
Adrian
Justin
Nadine
Vincent
______
hope u guys can help me =)
2007-02-14
03:34:16
·
4 answers
·
asked by
Anonymous
in
Computers & Internet
➔ Programming & Design