Exception in thread "main"
<p>Here is my code. the output should be 32.9. But it seems showing </p>

<blockquote>
  <p>Exception in thread "main" java.lang.NullPointerException     at
  ArrayLocation.main(ArrayLocation.java:14)</p>
</blockquote>

<hr>

<pre><code>public class ArrayLocation {
    private double coords[];

    public ArrayLocation(double[] coods){
        this.coords=coords;
    }

    public static void main(String[] args){
        double[] coords={5.0,0.0};
        ArrayLocation accra= new ArrayLocation(coords);
        coords[0]=32.9;
        coords[1]=-117.2;
        System.out.println(accra.coords[0]);
    }
}
</code></pre>