I'm programming in Eclipse and have found something strange...
If I create a class like so:
public abstract class Test {
public Test(Object obj) {}
}
Any child class would obviously require the super() to be filled in.
Same goes for:
public abstract class Test {
public Test(Object[] obj) {}
}
So why does my IDE not complain when I do the following, and not provide a super()?
public abstract class Test {
public Test(Object... obj) {}
}
And before you say "just run the program, it will fail", I used JUnit and the program ran fine, without providing a constructor in the extending class. My question is, why does this happen?
The child class looks like this:
public class Child extends Test {
// Should throw error.
}