IT Community - Software Programming, Web Development and Technical Support

Overloading and overriding

This is a discussion on Overloading and overriding within the Java Programming forums, part of the Software Development category; Method overloading: When a method in a class having the same method name with different arguments is said to be ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Java Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 09-21-2007, 12:24 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Overloading and overriding

Method overloading: When a method in a class having the same method name with different arguments is said to be method overloading.

Method overriding : When a method in a class having the same method name with same arguments is said to be method overriding.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-21-2007, 12:25 AM
vijayanand vijayanand is offline
D-Web Analyst
 
Join Date: Feb 2007
Posts: 293
vijayanand is on a distinguished road
Default Re: Overloading and overriding

Difference between overloading and overriding

a) In overloading, there is a relationship between methods available in the same class whereas in overriding, there is relationship between a superclass method and subclass method.

b) Overloading does not block inheritance from the superclass whereas overriding blocks inheritance from the superclass.

c) In overloading, separate methods share the same name whereas in overriding,subclass method replaces the superclass.

d) Overloading must have different method signatures whereas overriding must have same signature.
__________________

J.Vijayanand
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Difference between function overloading and operator overloading vigneshgets C and C++ Programming 6 10-23-2008 11:01 AM
What is the difference between “overloading” and “overridding”? Arun C and C++ Programming 1 07-20-2007 07:46 AM
What is the difference between “overloading” and “overridding”? prasath C and C++ Programming 2 07-17-2007 09:12 AM
Operator overloading in C++ prasath C and C++ Programming 1 07-16-2007 06:51 AM
Diff of Overloading and Overriding vigneshgets C and C++ Programming 1 05-18-2007 04:17 AM


All times are GMT -7. The time now is 11:30 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0