title: What data structure is most suitable for implementing a 2-D array in Java?
body: <p>I want to implement a 2-D array kind of a thing.</p>
  
  <p>What data structure will be most suitable for this? An array or some other data-structure will do. If there is any other data structure which will satisfy my requirement, then please tell me.</p>
  
  <p>I don't want to use an array because the 2-D array needs to be declared early in the program but it is not fixed; the size will be determined at run time.</p>
  
  <p>Also, the number of rows will be equal to the number of columns; this is fixed, because the same name will be given to both the rows and the columns.</p>
  
  <p>I also want to traverse through this 2-D data structure as I would through a Map.</p>