Win a copy of Terraform in Action this week in the Cloud forum!

vasantkr kr

Greenhorn
+ Follow
since Jan 25, 2006
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by vasantkr kr

sorry about posting a personal message.Thanks for the help.
15 years ago
Hi,
I have split strings(multiple) in a string buffer into two parts(arr[0],arr[1]) and stored it in an array.How do i check if the string stored is a date or decimal or a word.
Can anyone give me the solution to it.
15 years ago
Input File:
sss.java 88
sss.html 99.5
sss.java 89.5
sss.html 77
sss.java 11/13/2005
sss.html 02/22/2005
sss.java 89
.
.
.
// n inputs

Output File:
1.Sorted List for sss.java:
88
89
2.Sorted Decimal List for sss.java
89.5
3.Sorted Date list for sss.java
13-Nov-2005


1.Sorted List for sss.html:
77
2.Sorted Decimal List for sss.html
99.5
3.Sorted Date list for sss.java
22-feb-2005


i am reading the input and then using String Tokenizer to break each input line and storing it in a Hashtable but i have a problem getting the output that can be sorted and stored in an output file in the given format.
I hope i get a reply with a bit of code.
15 years ago
Input File:
sss.java 88
sss.java 89.5
sss.html 99.5
sss.java 11/13/2005
sss.html 02/22/2005
sss.html 02/23/2005
sss.java 89
.
.
.
// n inputs

Output File:
1.Sorted List for sss.java:
88
89
2.Sorted Decimal List for sss.java
89.5
3.Sorted Date list for sss.java
13-Nov-2005
23-feb-2005

1.Sorted List for sss.html:
88
89
2.Sorted Decimal List for sss.html
99.5
3.Sorted Date list for sss.html
22-feb-2005


The requirement is to read the data line by line as given in the input file for 'n' entries and then present the output by sorting.Output should be similar to the one shown in 'output file'.
Here is what i have done so far.......


//After this i need help to sort the values so that i can present them in the format specified in the output file.
[ January 25, 2006: Message edited by: vasantkr kr ]
15 years ago