title: create an array of twenty integers and fill the array with even numbers
body: <p>I am trying to create an array that prints out the first 20 even numbers but I don't know how to get the arrays to print them and I am only getting an array of twenty 0. So far this is what I have written.</p>
  
  <pre><code>int[] mylist = new int[20];
  int even = 0;   
  
  while ((even%2 == 0) &amp;&amp; (even &lt; 20)){
      even++;
  }
  
  System.out.println("Element at index 0: " + mylist[0]);
  System.out.println("Element at index 1: " + mylist[1]);
  System.out.println("Element at index 2: " + mylist[2]);
  System.out.println("Element at index 3: " + mylist[3]);
  ...
  </code></pre>
  
  <p>Edit: This is what I have done so far:</p>
  
  <pre><code>    int[] mylist=new int[20];//establishes the name and length of an array
  
      for (int even=0;even&lt;mylist.length;even++)
  
      {
      mylist[even]=even;
  
          if(even%2==0)
       System.out.println("Even Element: "+even);
  }
  </code></pre>
  
  <p>However, instead of printing out twenty even numbers it is just printing out the even numbers between 1 and 20.</p>