title: How to initialize an array in Java?
body: <p>I am initializing an array like this:</p>
  
  <pre><code>public class Array {
  
      int data[] = new int[10]; 
      /** Creates a new instance of Array */
      public Array() {
          data[10] = {10,20,30,40,50,60,71,80,90,91};
      }     
  }
  </code></pre>
  
  <p>NetBeans points to an error at this line: </p>
  
  <pre><code>data[10] = {10,20,30,40,50,60,71,80,90,91};
  </code></pre>
  
  <p>How can I solve the problem?</p>