Classes in Java: Creating & Using Anonymous Classes
Java SE 15
| Intermediate
- 7 Videos | 59m 45s
- Includes Assessment
- Earns a Badge
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.
WHAT YOU WILL LEARN
-
discover the key concepts covered in this coursedefine and use anonymous classesrecognize how anonymous instances are objectsillustrate the finer points of anonymous classes
-
implement the built-in interfaces, Comparator and Runnable, with anonymous classesperform filter operations with local and anonymous classessummarize the key concepts covered in this course
IN THIS COURSE
-
1.Course Overview2m 3sUP NEXT
-
2.Using Anonymous Classes in Java10m 32s
-
3.Defining Why Anonymous Class Instances Are Objects9m 10s
-
4.Exploring Nuances of Anonymous Classes in Java10m 20s
-
5.Implementing Interfaces with Anonymous Classes in Java13m 2s
-
6.Using Local and Anonymous Classes to Filter Data in Java13m 3s
-
7.Course Summary1m 36s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion of this course, which can be shared on any social network or business platform
Digital badges are yours to keep, forever.