One problem with the code you gave is in the split
method. At the end, you make assignments to all your variables, but you use double x1 = ...
, so you create a new variable called x1
which is not the same as this.x1
. You then never use this variable. That makes me think that you meant to do this:
x1 = Integer.parseInt(Coord1[0]);
x2 = Integer.parseInt(Coord2[0]);
x3 = Integer.parseInt(Coord3[0]);
y1 = Integer.parseInt(Coord1[1]);
y2 = Integer.parseInt(Coord2[1]);
y3 = Integer.parseInt(Coord3[1]);
This time, there is no double
at the beginning of the assingments.