java - @Override Snafu -
i've create project/class file in eclipse helios using jdk1.6. had let eclipse generate code implementation class of interface.
public interface foo { void bar(); } public class fooimpl implements foo { @override public void bar() { } }
so far good. reason, i've imported project in eclipse has jdk 1.5
, see error message the method bar() of type fooimpl must override superclass method
quick fix remove '@override' annotation.
after googling, got know there override_snauf - 6.0 java compiler updated allow @override on interface method implementations.
@override checking override syntax in compile stage, applied interface same reason guess.
Comments
Post a Comment