+ 9
What's the Need of '@override' in inheritance of Java?
7 Answers
+ 2
lol. Got it from my Java book. I program in Java all the time. So I keep it near me. I use it for programming Android. That was the best way that I understood it. Lol. I'll post a link to the book later, for you.
+ 8
đđđ kkk bro!
+ 6
Thank u Eric Gieger for sharing ur knowledge with an useful example.
I think its enough to learn about @override keyword after knowing ur answer.
+ 4
essentially the sign itself is just to notify you (or another developer) that the class is being overridden. Otherwise, the point of overriding... I'll just give an example. think of the toString method. Every class has a toString method whether it defines it or not, or whether it inherits it through another class or not, it explicitly extends, because the object class defines a toString method. each class treating the toString differently on how it handles it. Like an ArrayList will provide a square bracket, comma delimited list of strings. So the point is that every class is doing the same thing, so that it has to be overridden, but is doing it in its own way.
+ 4
Here is how I program in Android. They have some things they need to get worked out, but it's not bad.
https://play.google.com/store/apps/details?id=com.besome.sketch
+ 2
http://highered.mheducation.com/sites/007337606x/student_view0/index.html
+ 1
It is a marker annotation that can be used only on methods. A method annotated with @Override must override a method from a superclass. If it doesnât, a compile-time error will result. It is used to ensure that a superclass method is actually overridden, and not simply overloaded.