I'm using JDK1.6. When I implement an interface and in the implementing class, if I give @override
before my function names, Eclipse throws an compilation error. i.e. below code is wrong according to Eclipse.
public class SomeListener implements ServletContextListener {
@Override
public void contextDestroyed(ServletContextEvent arg0) {
// code
}
/* other overridden methods here */
}
If I remove @Override
annotation, then the code compiles fine. Does it mean that JDK1.6 does not require us to prefix the @override
annotation anymore?