Using classes in static main method : <p>So I'm writing a mini-board game program in Java.</p>

<p>The program is going to read in standard input and construct a game as directed in the input.</p>

<p>To help stay organized and progress my oo java skills, I am using a Cell class to act as a cell in a nxn game.</p>

<p>For the board game, I need to have it all in one file, and it must run from static void main.</p>

<p>Here's what my Cell class looks like</p>

<pre><code>public class Cell{
      public int x;
      public int y;
      .
      .
      .
 }
</code></pre>

<p>I want to read the input, and assign values to each cell and then add the cells to a list such as ArrayList allCells. However, I can not the use it in a static context.</p>

<p>I understand that static is a single instance, so I'm confused how I would go about doing this. Is there anyway I can use a class-based system to solve this problem. Each cell is it's own individual object, so making it stat wouldn't work.</p>

<p>Any sort-of explanation or alternative would be amazing! Hope I was clear enough in my description.</p>
