You should call methods, not constructors, using the dot ( . ) Operator. Here you call the constructor of the super class using the dot ( . ).
This is why you get errors like this:
The method myCoord() is undefined for the type myCoord
and
The method myCoord(double, double) is undefined for the type myCoord
Use them to call the super constructor: super(); and super(x,y); as shown below.
public class Coord3D extends myCoord { private double coorZ; Coord3D() { super(); // not super.myCoord(); its a constructor call not method call coorZ = 1; } Coord3D(double x, double y, double z) { super(x,y); // not super.myCoord(x,y); its a constructor call not method call coorZ = z; } }
source share