This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Java in General and the fly likes two dimensional array into vector Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "two dimensional array into vector" Watch "two dimensional array into vector" New topic
Author

two dimensional array into vector

thanvi janu
Greenhorn

Joined: Nov 16, 2009
Posts: 29
Hi all,,

How to represent two dimensional array in vector?

Thanks in Advance,
Thanvi,
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
> How to represent two dimensional array in vector?

define a 'two dimensional array' and the answer will stand out
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38107
    
  22
Michael Dunn wrote:define a 'two dimensional array'
If only people were taught there is no such thing as a 2D array in the first place.

Look at this Java™ Tutorials page and see what it says when you use ctrl-f "multidimensional".
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38107
    
  22
By the way, I think this is not the correct forum for this thread. I presume Maneesh or Rob will move it.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19656
    
  18

Moving to Java in General.

A multidimensional Vector is nothing more than a Vector of Vectors (of Vectors etc): Vector<Vector<X>>. Unlike with multidimensional arrays* you will need to initialize the inner Vectors manually.


* There actually is no such things. A multidimensional array is also nothing more than an array of arrays (of arrays etc). The only difference with a multidimensional Vector is that multidimensional arrays have a shortcut in syntax for creating them.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: two dimensional array into vector
 
Similar Threads
How to implement a sparsely populated two-dimensional array.
Problem with JDBC
one more certpal question
How to create this String array
how to delete row from Jtable