Method Overriding | Method Overloading |
---|---|
Arguments of overloaded methods cannot be changed. | Arguments of overloaded methods can be changed. |
Method return types cannot be changed except covariant return types. | Return types can be changed. |
Exceptions must not throw new or broader checked exceptions. | Exceptions can be changed. |
It happens at runtime. | It happens at compile-time. |
An object type determines which method is selected. | A reference type determines which method is selected. |
Welcome to the Java Blog, written by me with the sole purpose of talking about Java & Web technologies. I'm aiming this blog at other Java developers with the deeper aspects of writing code and resolving technical issues. Hopefully I can blog about some really interesting topics as I come across them. Mr. Patricia Seybold said, "If you learn to program in Java, you’ll never be without a job!"
Friday, May 29, 2009
Differences between method overriding and method overloading
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment