java - @Override on Implementation -


would put annotation in implementation class methods? serve purpose? if mistype or don't have it, compile error anyway.

i assume asking annotating methods defined in implemented interface, or abstract in super class. in case, correct typo in method signature result in compile error or without @override. however, think annotation still helpful explicitly mark method implementing interface. if interface ever changes, having @override annotations on implementing methods can pinpoint method signatures have changed , need updated.

more importantly, mklhmnn mentioned in answer, if method removed interface, @override annotation in implementing class cause compile error. without annotation, might not aware method had been removed interface, lead subtle bugs.


Comments

Popular posts from this blog

windows - Why does Vista not allow creation of shortcuts to "Programs" on a NonAdmin account? Not supposed to install apps from NonAdmin account? -

c++ - How do I get a multi line tooltip in MFC -

unit testing - How to mock PreferenceManager in Android? -