sample program of method overriding in java
Answers
Answered by
1
In java, a method can only be written in Subclass, not in same class. ... The access level cannot be more restrictive than the overridden method's access level. For example: if the super class method is declared public then the over-ridding method in the sub class cannot be either private or protected
Similar questions
CBSE BOARD X,
7 months ago
Math,
7 months ago
Computer Science,
1 year ago
Physics,
1 year ago
Math,
1 year ago
English,
1 year ago
Science,
1 year ago