Overloaded methods in Java java interview questions interviewdot

719 views · Published 21 September 2013 · 1:42 · Indexed 28 October 2026

Channel: Interview DOT · 2013 · Science & Technology

Watch on YouTube

Click here - https://www.youtube.com/channel/UCd0U_xlQxdZynq09knDszXA?sub_confirmation=1 to get notifications. Overloaded methods in Java java interview questions interviewdot
www.InterviewDot.com  -  Job Portal -- Java Interview Questions

Explain Overloaded Methods in Java ?

 Overloaded methods MUST change the argument list.

 Overloaded methods CAN change the return type.

 Overloaded methods CAN change the access modifier.

 Overloaded methods CAN declare new or broader checked exceptions.

  A method can be overloaded in the same class or in a subclass. In other words, if class A defines a doSomething(int i) method, the subclass B could define a doSomething(String s) method without overriding the superclass version that takes an int. 

So two methods with the same name but in different classes can still be considered overloaded, if the subclass inherits one version of the method and then declares another overloaded version in its class definition.
A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm

Other Top Job Portals
www.Naukri.com
www.MonsterIndia.com
www.TimesJobs.com

Are you looking for a new Job ?
InterviewDot.com - A Job Portal
http://www.InterviewDot.com http://www.InterviewDot.com http://www.InterviewDot.com
One Click Dream Job - http://www.interviewdot.com/upload-resume/uploadresume.htm

More from this channel