Skip to content

Comment on Why Java folks should stop looking down on C#: differences in similaritiesparent

Comments

@Override is typically used to detect when you intend to override some method of the superclass but mistakenly don't. Such as when you misspell a method or something. By default the 1.6 compiler will treat it as optional and the situation described above is possible. However, you can tell the compiler to treat a missing @Override as an error which would give you an indication of the problem above.

edit: unless you misspell the method you intend to override and forget to include the annotation, in which case the compiler can't help you :-)

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.