The following table summarizes the differences between method overriding and method overloading:
| 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. |
- Download practice question and study guide for master-ciw-enterprise-developer for exam.
- Pass SCBCD in first attampt.
- Download free practice test for scdjws SCDJWS exam.
- Click here to download scjp test study guide and practice question.
- Get certified in first attempt download scjp-5-0 - SCJP 5/6 simulation.
- Download free practice test for SUN SCMAD exam.
- Click here to download scwcd test study guide and practice question.
- Download free practice test for CX310-055 Java 5.0 exam.
- Get certified in first attempt download CX310-065 - SCJP 6.0 simulation.
Like this article? Share it with others
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
If you like this article, please leave a comment or subscribe this blog via RSS or via e-mail, Bookmark and share through your network. Click the AddThis button below. Thanks.
