Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert LinkedList to ArrayList

Status
Not open for further replies.

patnim17

Programmer
Jun 19, 2005
111
US
Hello,
Is there a way to convert a LinkedList to an ArrayList.
There reason I am asking, is, I am using Spring DAO to execute a Stored PRocedure that returns a Oracle Cursor as one of the output parameters. For some reason, the java object that I used as ParameterizedRowMapper for this out parameter, returns a LinkedList of these java objects...

and I need to do Random accesss, so I wanted to convert this LinkedList to ArrayList...

Any thoughts?

pat
 
I am guessing I can use

ArrayList aa = new ArrayList(lnkList);

where lnkList is the LinkedList..

pat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top