Classes in Java: Working with Static Nested, Inner, & Local Classes
Java
| Intermediate
- 13 videos | 1h 48m 32s
- Includes Assessment
- Earns a Badge
Static nested and inner classes in Java are used when classes have a logical relationship with or are intimately associated with the outer class within which they are defined. Local classes are classes defined within a scope and can only be accessed and used within that scope. They're the perfect tools to use when you want to limit the visibility of your classes. Through this course, learn to create and use static nested classes defined within an outer class. Explore how a closer relationship with an outer class can be expressed using inner classes and why access modifiers do not apply to local classes. And define and use local classes created with a code block. When you're finished with this course, you'll be able to pick the right kind of class for your use case and correctly implement nested classes, inner classes, and local classes.
WHAT YOU WILL LEARN
-
Discover the key concepts covered in this courseIllustrate how nested static classes workInstantiate and use static nested classesIllustrate various aspects of nested static classesRecognize the limitations of static nested classesDefine and use inner classesAccess variables from inner classes
-
Use inner classes to create iterators for data structuresDefine and use local classesAccess fields within local classesWork with access modifiers and scopes in local classesDefine local classes in initialization blocksSummarize the key concepts covered in this course
IN THIS COURSE
-
2m 13s
-
13m 4sIn this video, you'll learn how to illustrate how static nested classes work in Java. You'll discover that a static nested class is a nested class defined within an outer class. Typically, you define your classes in their own files when you set up your Java project. However, a nested class is defined within an outer class and thus the nested class is logically associated with the outer class. FREE ACCESS
-
12m 4s
-
8m 44s
-
8m 42s
-
12m 25s
-
12m 25s
-
9m 52s
-
10m 13s
-
6m 9s
-
5m 28s
-
5m 24s
-
1m 50s
EARN A DIGITAL BADGE WHEN YOU COMPLETE THIS COURSE
Skillsoft is providing you the opportunity to earn a digital badge upon successful completion on some of our courses, which can be shared on any social network or business platform.
Digital badges are yours to keep, forever.