Here is my code. the output should be 32.9. But it seems showing
Exception in thread "main" java.lang.NullPointerException at ArrayLocation.main(ArrayLocation.java:14)
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]);
    }
}
 
     
    