Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Polymorphism:
- The ability of one general thing to behave like other specific things.
- In Java, polymorphism can take two forms: method overloading and method overriding.
- Method overloading happens when various methods with the same name are present in a class.
- When they are called they are differentiated by the number, order, and types of their parameters.
- Method overriding occurs when the child class overrides a method of its parent.
- A Deer IS-A Animal
- A Deer IS-A Vegetarian
- A Deer IS-A Deer
- A Deer IS-A Object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement