title: Java Inheritance -> Can't refer to an instance field in constructor error?
body: <p>I want c to be a random color, so I can spawn many enemies of different color, but not sure how to do it. If I put like Color.cyan in it works fine. But if I want to put a variable in the super() it does not like that. I am new to Java so I am just trying to figure things out. Is this possible without making the variable static?</p>
  
  <pre><code>package first.Game;
  
  import java.awt.Color;
  import java.util.Random;
  
  public class MenuEnemy extends Enemy{
  
      private Random r = new Random();
      private Color c = new Color(r.nextInt(255), r.nextInt(255), r.nextInt(255));
  
      public MenuEnemy(float x, float y, Handler handler)
      {
          super(x, y, 16, 16, 2, 8, c, ID.Enemy, handler);
      }
  }
  </code></pre>