public class Point3D { private double x; private double y; private double z; public Point3D(double _x, double _y, double _z){ x = _x; y = _y; z = _z; } public void set(double[] _new){ x = _new[0]; y = _new[1]; z = _new[2]; } public double[] get(){ return new double[]{x, y, z}; } }