This week's book giveaway is in the Mac OS forum.
We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell 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


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.
 
GeeCON Prague 2014
 
subject: Sorting objects using comparator doesnt work