answersLogoWhite

0

Overriding methods that are in the parent class is to redefine them in the current (child) class in a different way. Like if you're extending a class but you don't like the behavior of one method in that class, you can override that method and write your own code.

Overloading a method in the current class is defining another copy of the method with different signature. They call them overloaded methods.

This is an example of overloaded methods:

myMethod(int i, int b){ .... }

myMethod(String s) { ... }

myMethod(boolean b) {...}

Hope that was clear

User Avatar

Wiki User

13y ago

Still curious? Ask our experts.

Chat with our AI personalities

JudyJudy
Simplicity is my specialty.
Chat with Judy
BlakeBlake
As your older brother, I've been where you are—maybe not exactly, but close enough.
Chat with Blake
DevinDevin
I've poured enough drinks to know that people don't always want advice—they just want to talk.
Chat with Devin

Add your answer:

Earn +20 pts
Q: Explain any 8 difference between overloading and overriding?
Write your answer...
Submit
Still have questions?
magnify glass
imp