This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Java in General and the fly likes Vectors Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Vectors" Watch "Vectors" New topic
Author

Vectors

Anonymous
Ranch Hand

Joined: Nov 22, 2008
Posts: 18944
Hi,
Consider String s[][],this is twodimesional array
s[0][0]="vijay" we can store element(by using two for loops,we can store strings with out that also we can ).Like that it is possible to store elements in vector how i can break numbering.
I will give one example.
Vector v =new Vector();
v.add("");here indexing we can't break just like Arrys.
My idea is in two dimesinal array 20 rows are there,and columns
11 ,if you go on adding in vector,it won't break numbering just like array.How it possible.
Bye,
vijay
srinivas acharyulu
Greenhorn

Joined: Aug 03, 2000
Posts: 19
Obviously Vector cannot be equivalent to a twodimensional array. There you have the concept of capacity.As it is being said 20 rows and 11 columns in an array for example, then all the 220 elements have to be added to the vector. And there for retrieving you have to retrieve like say v[i].


D.Srinivas Acharyulu<BR>SystemsEngineer,<BR>WIPRO Technologies,<BR>Hyderabad,India
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Vectors
 
jQuery in Action, 3rd edition