aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Sorting objects using comparator doesnt work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Sorting objects using comparator doesnt work" Watch "Sorting objects using comparator doesnt work" New topic
Author

Sorting objects using comparator doesnt work

Vs Kommuru
Greenhorn

Joined: Mar 31, 2010
Posts: 7
Hi,

I would like to sort a list of objects using Comparator. It does nt work. please let me the problem in the following code:



Thanks,
kommuru
rogel garcia
Ranch Hand

Joined: Dec 19, 2003
Posts: 41
It is working...

Check the type of g and gs objects in the main function....


SCJP 1.4
Vs Kommuru
Greenhorn

Joined: Mar 31, 2010
Posts: 7
Thanks Rogel. Its working now.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Sorting objects using comparator doesnt work
 
Similar Threads
Confused about use of compareTo()
Reading data from a file and storing into array of strings problem
Collections.sort() on Array List
Sorting Collections Doubt
collection problem?? please solve