Amdocs Interview Questions for Java Developer Position asked very recently for 1 to 3 years of experience.
Question: Can we use different access modifiers in Method Overloading and Method Overiding in java ?
Topics:
Access Modifier
Method Overloading
Method Overriding
Answer:
We have use different access modifiers in method overloading.
In method overring we can use different access modifier but we can not make it weaker or we can not make scope to lower.
ex. we can not change from public to any other access modifier
protected - public
default - public ,protected
#interview #javainterviewquestions #amdocs #javaprogramming #sjprogrammingsolutions
How to answer interview questions ?
Thank you for watching the video. If you find it usefull please share with your friends and don't forget to subscribe the channle.
Thank You !