title: How to create a class to handle multidimensional arraylist
body: <p>During my search for info about multidimensional arraylist, I read that you could create a class to handle the multidimensional arraylist. </p>
  
  <p>I'm doing a Android game similar to Bejeweled, and instead of using a common multidimensional grid, I guess this would be better!? I also has a list of all the sprite objects and I wonder if I can store and control all this objects with a multidimensional arraylist class?</p>
  
  <p>But I'm not sure how a class would look like and how do I set and get values from the arraylists? Is there anyone who are interested to explain how it's working and show a simple code example? Thanks!</p>
  
  <p>EDIT: I want to have objects in the arraylists like this example <code>int grid[][] = new int[8][8];</code> but instead of integers, I want to have objects. And I wonder if it's possible to get and set values the same easy was like in the example I just showed?</p>
  
  <p>EDIT 2: I have a grid 8x8 and that's why I'm using a array like [8][8], but I can only have values of type integers or booleans at each positions. I also have to use an arraylist to handle all the 64 objects that has a positions within this grid. Each object store it's position, both in the grid array and the position on the screen. I just wanted to make it a little bit simplier to handle and create a gird with multidimensional arrayList to both store the objects and have a grid? Possible or is there a better way to do this?</p>