title: Adding Objects to a Vector in Java
body: <p>I'm trying to add a Objects to a vector be when I use the Code Pasted below I get errors that says "Syntax error on token(s), misplaced construct(s)." and "Syntax error on token "gamePaddle", VariableDecloratorID Expected after this token." I've looked everywhere and can't find what I'm doing wrong they all tell me to construct the Vector like this. The error happens on the line that starts ListOfGameObjects.add(...</p>
  
  <pre><code>class GameWorld {
  /**
   * Code that instantiate, hold, and manipulate GameOobjects and related game state data.
   * @author Tyler Thomas
   *
   */
          Paddle gamePaddle = new Paddle();
          Ball gameBall = new Ball();
          Edge topEdge = new Edge(50, 150);
          Edge bottomEdge = new Edge(50, 0);
          Edge leftEdge = new Edge(0, 75);
          Edge rightEdge = new Edge(100, 75);
          Vector&lt;GameObject&gt; ListOfGameObjects = new Vector&lt;GameObject&gt;();
          ListOfGameObjects.add(gamePaddle);
  }
  </code></pre>