Exercises

  1. Describe the three different kinds of inner class. Find an example of one kind of inner class in the Java run-time library source code. Describe it.

  2. What is a static nested class? Give an example of where you might use one.

  3. Find an example of a local inner class in the Java run-time library, and explain why it is used there.

Get Just Java™ 2 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.