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 Feb 22nd, 2006, 9:59 PM   #1
oNe8
Newbie
 
oNe8's Avatar
 
Join Date: Jan 2006
Posts: 17
Rep Power: 0 oNe8 is on a distinguished road
Sorting an array of objects

Ok this one has me pretty stumped for something that should seem very simple.

SO i have an object[] that i need to sort by in alabetical order by the String returned by object.getName(). I suspose this can be done some how by using Arrays.sort(object[], Comparator c) but i have no idea how i would go about that.

I the only reason i really want the array sorted it just so i can save processing power by using a binary search later on rather then brute forcing the hell out of the array.
oNe8 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 11:08 AM.

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