Results 1 to 6 of 6
- 07-26-2010, 01:34 AM #1
Member
- Join Date
- Jul 2010
- Posts
- 19
- Rep Power
- 0
HELP: Sorted, Unsorted, & Indexed list
So I have two list (List1 & list2). Each has 4 add statements and one remove statements. Then 4 println statements (SOrted, list1, unsorted, list2).
UnsortedListInterface list1 = new RefUnsortedList();
SortedListInterface list2 = new RefSortedList();
Example:
list1.add("apple")
list1.add("pear")
list1.add("peach")
list1.add("orange")
list1.remove("peach")
and same thing for list2
But I'm not sure about the result...For unsorted, would it be thefoloowing and vice versa in a sense for list2 sorted.
apple
orange
pear
- 07-26-2010, 01:50 AM #2
Sorry, I missed your question or problem.
Do you have a problem or question?
if so, please post it.
- 07-26-2010, 02:04 AM #3
Member
- Join Date
- Jul 2010
- Posts
- 19
- Rep Power
- 0
Well my question What is expected when I see the "Ref" appended to the newlist expected?
- 07-26-2010, 02:23 AM #4
Not sure what you are asking.What is expected when I see the "Ref" appended to the newlist expected
Do you have a problem with the code you posted? Do you get compiler errors?
Please copy and paste them here.
- 07-26-2010, 02:38 AM #5
Member
- Join Date
- Jul 2010
- Posts
- 19
- Rep Power
- 0
Norm, sorry for the confusion. This is two separate issues/questions I have posted....
On this particular thread, I'm trying to determine what is the expected result? Though it appears straight forward, the "REF" in front and attach to sorted or unsorted has thrown me through for a loop on the expected result..
Example: "Ref" - I'm not change what this does ot the expected result?
UnsortedListInterface list1 = new RefUnsortedlist();
list.add("apple");
list.add("pear");
list.add("peach");
list.add("orange");
list.remove("peach");
- 07-26-2010, 02:42 AM #6
Similar Threads
-
Searching in Indexed XML
By peliukasss in forum LuceneReplies: 0Last Post: 06-17-2010, 05:13 PM -
Casting an int from a sorted set
By Bmack in forum New To JavaReplies: 2Last Post: 03-17-2010, 07:09 PM -
i need help with my code.how can i eliminate duplicate number from my sorted list
By yinghang in forum New To JavaReplies: 6Last Post: 04-13-2009, 04:19 AM -
How to create a Sorted List in Java
By Java Tip in forum java.langReplies: 0Last Post: 04-16-2008, 10:31 PM -
My doublyLinked list does not get sorted
By hasani6leap in forum New To JavaReplies: 0Last Post: 01-06-2008, 03:09 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks