Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Nov 25th, 2005, 2:00 PM   #1
säkki
Newbie
 
Join Date: Feb 2005
Posts: 9
Rep Power: 0 säkki is on a distinguished road
about sort()-method

Here's the problem little simplified:

I have made two classes Person and CardIndex.

I created Objects from both
Person myP = new Person("FirstName", "LastName");
CardIndex cInd = new CardIndex();

CardIndex is basically a vector where I dump those Persons.

Classes have some other stuff in them too, and Person is a super-class for two other Classes, so in CardIndex-vector can be at least three kind of classes or something like that.
Problem:
I have to sort the cInd by LastName using sort()-method. I'm lost

//Collections.sort(cInd**!*"*#) brainMalfunction. Thanks for any help.
säkki is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 12:33 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC