title: Create an array in which every position is an enum type
body: <p>Hi I would like to create an array in which every position is represented by the value of an enum.</p>
  
  <p>For instance:</p>
  
  <pre><code>public enum type{
  
    green,blue,black,gray;
  
  }
  </code></pre>
  
  <p>Now i want to create an array in which every position is green,blue,...</p>
  
  <p>I'll be clearer. I would like to create an array in which the position is rapresented by a value of enum class.instead int[] array = new int[10] create int[] array = new int[type.value]</p>