Week 2

Inheritance

Interfaces

Polymorphism

Error Handling in Java

Practice

Assignment

Back end Track

Week 2 Overview

Week 1 gave you the foundation of Java: how the language works, how to structure a program, and how to model real-world things using classes and objects. You wrote working programs — but all the logic lived in a single layer of classes.

Week 2 goes deeper. You will learn how classes and objects can relate to each other, share behaviour, and communicate through contracts. By the end of this week, you will write code that is not just correct — it is extensible, flexible, and resilient to failure.

These are the core principles that separate production-quality Java from beginner code. Every Java backend system you will ever work on — Spring Boot APIs, database layers, microservices — is built on exactly these ideas.

Learning goals

Inheritance

Interfaces

Polymorphism

Exception Handling


The HackYourFuture curriculum is licensed under CC BY-NC-SA 4.0 *https://hackyourfuture.net/*

CC BY-NC-SA 4.0 Icons

Built with ❤️ by the HackYourFuture community · Thank you, contributors

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