+ 1

"@Override" clarification

Hello, I've been seeing a lot of questions/quizes using @Override and overriding methods. The "@Override" is only useful for JavaDoc, You can override methods without using it, and the compiler would work just fine.

12th May 2017, 9:57 PM
Yassine Rajjaf
Yassine Rajjaf - avatar
2 Antworten
+ 14
It is an annotation indeed. You can switch off the error messages from the ide and it will work without @Override. But I think it's helpful ^^
12th May 2017, 10:41 PM
Tashi N
Tashi N - avatar
+ 8
@Override is great though. It'll throw an exception if it's not overriding anything, making potential errors easy to avoid. Plus it improves the codes readability.
12th May 2017, 10:12 PM
Rrestoring faith
Rrestoring faith - avatar