React.js
Angular
Ethical Hacking
Agile
AWS
BlockChain
Cassandra
Cloud
Salesforce
Scaled Agile
TOGAF
DevOps
GIT
Jenkins
Jira
Kibana
Linux
NGINX
Ansible
Artificial Intelligence
in JAVA by

What is method overriding in java ?

If we have methods with same signature (same name, same signature, same return type) in super class

and subclass then we say

subclass method is overridden by superclass.

When to use overriding in java

If we want same method with different behaviour in superclass and subclass then we go for overriding.

When we call overridden method with subclass reference subclass method is called hiding the superclass

method.

Click here to read more about JAVA

Related questions

Madanswer
0 votes
asked Jun 16, 2019 in JAVA by reins.robin
0 votes
asked Jun 16, 2019 in JAVA by reins.robin
...