+ 4

What is meant by overriding a Java base class as opposed to overriding it's methods?

https://www.sololearn.com/post/195755/?ref=app

17th Dec 2019, 5:05 AM
Sonic
Sonic - avatar
10 Antworten
+ 6
David Carroll thanks. I am going to report that question to be taken off the pool.
17th Dec 2019, 7:48 PM
Sonic
Sonic - avatar
+ 5
According to that question, the base class is the only one of the options that can be overriden. I get the feeling that what they mean by overriding the base class is simply extending and overriding the non final and non static methods of the base class. But I found the question misleading.
17th Dec 2019, 7:27 AM
Sonic
Sonic - avatar
+ 5
Avinesh, constructors and final methods also cannot be overriden, so those boxes also need to be checked in the question.
17th Dec 2019, 10:24 AM
Sonic
Sonic - avatar
+ 4
Yes, I am also not familiar with the expression of overriding a class. I am familiar with the expression of overriding methods and extending/inheriting (from) classes. Perhaps we need to ask an expert. David Carroll ?
17th Dec 2019, 10:43 AM
Sonic
Sonic - avatar
+ 3
Which option was excluded? Edit: I did not notice that it is base class.
17th Dec 2019, 5:51 AM
Avinesh
Avinesh - avatar
+ 3
I think except static methods, the rest of the boxes has to be checked. Because the one who created the quiz probably do not know that overriding a static method is not possible and you only "redefine" a method in an extending class and not override it.
17th Dec 2019, 7:54 AM
Avinesh
Avinesh - avatar
+ 3
It is quite simple that a class itself cannot be overridden and only it's methods can. So probably that is different from what we are thinking it actually is.
17th Dec 2019, 10:35 AM
Avinesh
Avinesh - avatar
+ 3
Coder Kitten Indeed... The answer (or option rather) doesn't make sense without further specificity. However, "a base class method" makes more sense than "a base class" in the context of something that can be overridden. Perhaps he was trying to convey: [ ] all other base class methods Ultimately, the question, in its current form, should never have been approved. But that could be said about so many questions. 😉
17th Dec 2019, 7:02 PM
David Carroll
David Carroll - avatar
+ 1
In case if base class is abstract, then it should be Overridden methods...
17th Dec 2019, 10:20 AM
Jayakrishna 🇮🇳
+ 1
Sonic The only thing I can guess is the author meant to write: [ ] a base class method Otherwise, that answer makes no sense.
17th Dec 2019, 6:18 PM
David Carroll
David Carroll - avatar