Related to Vector

Joined
Jul 19, 2006
Messages
1
Reaction score
0
Hi all
I'm new to java and i have problem while using Vectors. I hope any one can help me with this.
I'm trying to make Vector<Vector<info>> where info is a user defined type which contains user information like name etc. I have ,
Vector<Vector<info>> all_info=new Vector<Vector<info>>();

and i have another Vector<info> user_info which gets value inside some method.
Now i want to add user_info vector to all_info. So i did
all_info.add(user_info)

I'm doing it a around 3, 4 times but whenever i want to access all the elements of all_info one by one i don't get the right result. So if i'm doing
1. all_info.add(user_info)
2. all_info.add(user_info)
3. all_info.add(user_info)

then while accessing all the elements of all_info i get only 3rd values not 1st and 2nd.
Does anybody had faced same type of problem and know the solution Can you please help me.
Thanks a lot in advance
Regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top