Java Which if the following is true about overriding and overloading? 1.Overridi
ID: 3720613 • Letter: J
Question
Java
Which if the following is true about overriding and overloading?
1.Overriding always apply to methods in a parent and child class and overloading always applies to methods in the same class.
2.Overriding always apply to methods in a parent and child class and overloading can applies to methods in the same class.
3.Both overloading and overriding refer to methods in a parent/child class relationship.
4.Both overloading and overriding must refer to methods in the same class.
1.Overriding always apply to methods in a parent and child class and overloading always applies to methods in the same class.
2.Overriding always apply to methods in a parent and child class and overloading can applies to methods in the same class.
3.Both overloading and overriding refer to methods in a parent/child class relationship.
4.Both overloading and overriding must refer to methods in the same class.
Explanation / Answer
1. Overriding always apply to methods in a parent and child class and overloading always applies to methods in same class.