Computer Science, asked by kuyakevz14, 11 months ago

sample program of method overriding in java

Answers

Answered by rakhich1978
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