Week 2

Inheritance

Abstract Classes

Interfaces

Polymorphism

Error Handling in Java

Practice

Assignment

Back end Track

Under construction

<aside> 🚧

This page is currently under construction. Please check back later.

</aside>

Implementation plan:

  1. What is polymorphism — one interface, many implementations
  2. Runtime polymorphism (dynamic dispatch via method overriding)
  3. Compile-time polymorphism (method overloading)
  4. Programming to an interface / superclass type
  5. Declaring a variable as the interface or parent type
  6. instanceof operator — checking type at runtime
  7. Why polymorphism matters: flexibility, extensibility
  8. Exercise: demonstrate polymorphism with a collection of mixed types

The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0

CC BY-NC-SA 4.0 Icons

*https://hackyourfuture.net/*

Found a mistake or have a suggestion? Let us know in the feedback form.