+ 2
What is the role of @override function in java.
What is the meaning of this function and how does it work? If as possible give the answer with example in simple way please.
2 odpowiedzi
+ 7
It's not a function.
@Override shows that you want to override base method. It is not required to use this attribute, but it's easier to read code with it.
Also if you will make a mistake in method name/parameters compiler will show error instead of creating another function
+ 1
here is an example that you may want to check to see difference or understand the meanings of overriding and overloading https://code.sololearn.com/c0awDMpDLukF/?ref=app