Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / December 2004

Tip: Looking for answers? Try searching our database.

retrieving arrays frrom vecttors or linked list

Thread view: 
rohan shah - 30 Dec 2004 16:42 GMT
Hey if i have stored array objects in a linked list or vector or any
other
list, then how do i retrive it to a 2 dimensional array.
Consider  1 dimension arrays of objects-obj1[] which i keep on adding
to a vector or any java list from the util class-list1. Thus 1st
element of l1 would contain an array obj1, 2nd element also contains
obj2[] with diff values, and so on. Now if there is an array 2
dimension array obj2[][], then how do I make it possible that
obj2[0][0] contains obj1[0] of element 0 of the list, obj2[0][1]
contains obj1[1] of element 0 of the list and so on, then  obj2[1][0]
contains obj1[0] of the 2nd element of the list, obj2[1][1] contains
obj1[1] of 2nd element of the list and so on.
in short obj2[i][j] should contains obj1[jth] element of ith element
of the list.
plz help me urgently.
klynn47@comcast.net - 30 Dec 2004 17:07 GMT
I assume that you're adding the entire array as an element to the
Vector. You should be able to downward cast the element to the array.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.