title: List loop JavaFx
body: <p>I am trying to create different circles with <code>List</code> and <code>ArrayList</code>:</p>
  
  <pre><code>List&lt;Circle&gt; views = new ArrayList&lt;Circle&gt;();
  for(int i = 1; i &lt; 5; i++) {
      views.add(new Circle());
  }
  </code></pre>
  
  <p>But when I use a for loop to get the circles:</p>
  
  <pre><code>Random rand=new Random();
  int a,b;
  for(int k=1;k&lt;5;k++){
  
      a=rand.nextInt(400)+20;
      b=rand.nextInt(400)+20;
  
      views.get(k).setCenterX(a);
      views.get(k).setCenterY(b);
      views.get(k).setRadius(10);
      views.get(k).setFill(Color.DARKRED);
  
  }
  </code></pre>
  
  <p>It shows me an error.</p>