What's "@Override" there for in java?

Posted by symfony on Stack Overflow See other posts from Stack Overflow or by symfony
Published on 2010-03-22T04:07:06Z Indexed on 2010/03/22 4:11 UTC
Read the original article Hit count: 343

Filed under:
|
public class Animal {
   public void eat() { System.out.println("I eat like a generic Animal."); }

}

public class Wolf extends Animal {
   @Override
   public void eat() { System.out.println("I eat like a wolf!"); }
}

Does @Override actually have some functionality or it's just kinda comment?

© Stack Overflow or respective owner

Related posts about java

Related posts about syntax