i need a code to merge two ordered list of objects of integers.the method should receive references to each of the list objects to be merged , and should return a reference to merged list object.
pls help....
bhavna13
0
Newbie Poster
Recommended Answers
Jump to PostMake an attempt, at least. If it "doesn't work" then post that code and describe, exactly, what "doesn't work" mean and provide all (and complete) compiler/error messages.
This is not a code service.
Jump to PostI thought you wanted lists of Integers? Where did you copy this from (not that it's very good, BTW). Simply use the "addAll" method from the Collections class, see the API docs. And, of course, put the code into it's own method (as the description says). Retuning a reference, is, …
All 5 Replies
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
bhavna13
0
Newbie Poster
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
bhavna13
0
Newbie Poster
masijade
1,351
Industrious Poster
Team Colleague
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.