I am getting compile errors in eclipse when using the @Override annotation for a class that is implementing an interface.
Compiler compliance level is set to Java 6.0.
I am using the latest version of the 6.0 jdk.
Error: "The method {methodname} of type {classname} must override a superclass method"
Same code works fine on mac with comparable configuration.
public interface ChannelIF {
...
public boolean canSendNarrowcast();
public boolean canSendBroadcast();
}
public class FacebookChannel implements ChannelIF
{
...
@Override
public boolean canSendNarrowcast() { return true; }
@Override
public boolean canSendBroadcast() { return true; }
}
This feature is only valid in Java 6 and higher. I see you are using jdk 1.6. That's good. Possible cause: You are compiling with -source 1.5
. Is this the case? If so, can you change it to -source 1.6
?