Question 1240 – Nielit STA [02-12-2018]
December 10, 2023
Question 1246 – Nielit STA [02-12-2018]
December 10, 2023
Question 1240 – Nielit STA [02-12-2018]
December 10, 2023
Question 1246 – Nielit STA [02-12-2018]
December 10, 2023

Question 1241 – Nielit STA [02-12-2018]

Which of the following is FALSE about inheritance in Java?

Correct Answer: C

Question 21 Explanation: 
→ Methods declared public in a superclass must also be public in all subclasses (this, by the way, is the reason most of the applet methods are public).
→ Methods declared protected in a superclass must either be protected or public in subclasses; they cannot be private.
→ Methods declared private are not inherited and therefore this rule doesn’t apply.
→ Methods declared without protection at all (the implicit package protection) can be declared more private in subclasses.
A
Private methods are final
B
Protected members are accessible within a package and inherited classes outside the package
C
Protected methods are final
D
We cannot override private methods
0 0 votes
Article Rating
Subscribe
Notify of
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
error: Alert: Content selection is disabled!!