Nested Classes: Lesson
Lesson 1 of 1
  1. 1
    Let’s begin by defining what a nested class is! A nested class is a class that can be found within another class. The pr…
  2. 2
    As mentioned in the previous exercise, there are two types of nested classes: non-static (also known as inner) nested, and static. Let’s take a closer look at what makes these two types of clas…
  3. 3
    Now that we’ve reviewed the main differences between non-static nested and static nested classes, let’s break down how to implement the use of a non-static nested class. For more clarity, from here…
  4. 4
    In this exercise, we will explore the concept of static nested classes. A static nested class is a class that belongs to its enclosing class in the same way that a static variable belongs to its …
  5. 5
    Now let’s take a look at the concept of shadowing in Java. Shadowing allows for overlapping scopes of members with the same name and type to exist in both a nested class and the enclosing class s…
  6. 6
    You made it! Let’s review what we have learned so far! - There are two main types of nested classes: non-static (also known as inner) nested classes, and static nested classes - Nested class…

What you'll create

Portfolio projects that showcase your new skills

How you'll master it

Stress-test your knowledge with quizzes that help commit syntax to memory