Chapter 14

Inner Classes, Anonymous Classes, and Lambdas

With each new version, the developers of Java make it more sophisticated. When it was first released, Java had only 250 classes in the Java Class Library.

So far you have learnt to create a class and inherit other classes. However, Java allows you to organize your classes in some easier ways.

You will learn about inner classes and anonymous inner classes.

Java 8 offers a new feature that was requested by thousands of programmers: lambda expressions, another topic we will learn in this chapter.