public boolean addPoint(Point p){
points.add(p);
return points.add(p);
extremes();
}
Alright so when I run this code the main class calls addPoint and passes it a Point, however when it gets to the line "points.add(p);" it gives me a "java.lang.NullPointerException" error. FYI: "points" is an arrayList.
Also on a side note, am I using the "return points.add(p);" right to return a boolean value? And on another side note I don't seem to be calling "extremes();" right, as I get an Unreachable code error.
Thanks for all the help! :)