What happens (if anything) when a constructor calls ‘super()’ without having any superclass besides Object? Like so:
public class foo implements Serializable, Comparable {
int[] startPoint;
public foo() {
super();
startPoint = {5,9};
}
}
Edit:
It is always OK to delete the line
super();from any constructor, and there is nothing particular about the constructors of classes that extendObject. The call of the nullary superclass constructor is always implied, so whether you write it down or not, you always get the exact same semantics.Note that this means that if you omit a call to the superclass constructor that does something big, like start database connections or the whole GUI, all this will happen whether or not you actually write
super();.