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

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -