Chapter 7
Using Inner Classes, Anonymous Classes, and Lambda Expressions
In This Chapter
Using inner classes
Creating static inner classes
Implementing anonymous classes
Adding Lambda expressions
In this chapter, you find out how to use three advanced types of classes: inner classes, static inner classes, and anonymous inner classes. All three types are useful in certain circumstances. In particular, inner classes and anonymous inner classes are commonly used with graphical applications created with Swing. For more information about Swing, refer to Book VI. In this chapter, I concentrate on the mechanics of creating these types of classes.
Get Java All-in-One For Dummies, 4th Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.