title: How to use array object?
body: <p>let there is a class named  Calc.java  inside this class there is a method named  Min </p>
  
  <pre><code>  public int Min(int one, int two)
      {
          return one - two ;
      }
  </code></pre>
  
  <p>Now in the main class that nemed First.java :</p>
  
  <pre><code>package first;
  public class First {
      public static void main(String[] args) {
          Calc y [] = new Calc[3];
  
         System.out.println(y[1].Min(5, 3));
      }
  }
  </code></pre>
  
  <p>when Run : </p>
  
  <blockquote>
    <p>Exception in thread "main" java.lang.NullPointerException     at
    first.First.main(First.java:9) Java Result: 1 BUILD SUCCESSFUL (total
    time: 0 seconds)</p>
  </blockquote>
  
  <p>Netbeans shows Hint : Unbalanced read/write with arrays</p>
  
  <p>i don't know what's wrong !
  Thanks...</p>