This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Last 10 numbers dialed on my cell phone Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Java in General
Bookmark "Last 10 numbers dialed on my cell phone" Watch "Last 10 numbers dialed on my cell phone" New topic
Author

Last 10 numbers dialed on my cell phone

leo donahue
Ranch Hand

Joined: Apr 17, 2003
Posts: 327
Is this an example of an ArrayList Collection?


Thanks, leo
Joel McNary
Bartender

Joined: Aug 20, 2001
Posts: 1824

Could be...of course, it could be a LinkedList or some other implementation of List (a Queue implementation with a length limit of ten seems probable to me). Suffice to say, it would be an implementation of java.util.List -- unless, of course, your phone only stores the last ten unique numbers, in which case a java.util.Set might be more appropriate. (Of course, you would want a Set that also provides List-type capibilities).
Your phone book would be an implementation of a java.util.Map--probably a java.util.SortedMap, since it not only stores a Name:Number::Key:Value relationship, but it sorts on the Name for display.


Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Last 10 numbers dialed on my cell phone
 
It's not a secret anymore!