java.lang.Object | +--test.foo.Class1 | +--test.foo.Class2
Untamed: Demonstrates a bug in Sun's j2sdk1.4.1's javac compiler.
This class itself compiles, as it should, whether or not it is declared
abstract. However, if it is declared abstract, then its concrete subclass,
test.bar.Class3
, refuses to compile:
test/bar/Class3.java:14: test.bar.Class3 should be declared abstract; \ it does not define zip() in test.foo.Class1 public class Class3 extends Class2 { ^ 1 errorThis is wrong, because the abstract zip() from
Class1
is defined
here in Class2. But perhaps because it is package (ie default) scope,
and Class3 is in a different package, the compiler misses this when
Class2 is abstract.
Class2()
public Class2()
void zip()