title: How should I store the map in a game?
body: <p>I am building a simple 2D game in Java, but I cannot decide how to store the map data. I want something like arrays, however global arrays in Java are static, and they cannot be dynamic sized. I am going to load the map from a file, however, sometimes the maps are differently sized.</p>
  
  <p>Hashmap looks too complicated for what I want. <strong>What would be a good way to store the data easily?</strong> I want to create a simple method to retrieve the data for each coordinate.</p>
  
  <p>Example:</p>
  
  <pre><code>int blockdata = blockCheck(5, 8);
  </code></pre>
  
  <p>It would then return the data "5a7" or whatever the data is. In similar games I have just had static variables in an array, but I do not know how to do this being dynamically sized.</p>