5910 Breckenridge Pkwy Suite B, Tampa, FL. 33610
(800) 272-0707

SkillSoft Explore Course

Aspire     Java Novice to Javanista     Java Novice to Javanista Track 2: Java Apprentice
Anonymous classes in Java allow you to define code that use-and-throw. These are classes where you define and instantiate a class simultaneously and which are anonymous, i.e., do not have a name.
These are perfect in scenarios where you want a class that implements a certain interface but will not be reused beyond where it is defined and accessed.
Through this course, learn to create and use anonymous classes, recognizing how they are nested, inner, and unnamed classes that either implement an interface or derive from a base class. As you advance, explore some common use cases for anonymous classes.
When you're finished with this course, you'll be able to create and use anonymous classes in Java correctly, with the correct syntax, and for the proper use case.

Objectives

Classes in Java: Creating & Using Anonymous Classes

  • discover the key concepts covered in this course
  • define and use anonymous classes
  • recognize how anonymous instances are objects
  • illustrate the finer points of anonymous classes
  • implement the built-in interfaces, Comparator and Runnable, with anonymous classes
  • perform filter operations with local and anonymous classes
  • summarize the key concepts covered in this course