This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
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


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
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.
 
Don't get me started about those stupid light bulbs.
 
subject: Sorting objects using comparator doesnt work