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
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