Classes in Java: Working with Static Nested, Inner, & Local Classes

Java    |    Intermediate
  • 13 videos | 1h 48m 32s
  • Includes Assessment
  • Earns a Badge
Rating 4.3 of 47 users Rating 4.3 of 47 users (47)
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 course
    Illustrate how nested static classes work
    Instantiate and use static nested classes
    Illustrate various aspects of nested static classes
    Recognize the limitations of static nested classes
    Define and use inner classes
    Access variables from inner classes
  • Use inner classes to create iterators for data structures
    Define and use local classes
    Access fields within local classes
    Work with access modifiers and scopes in local classes
    Define local classes in initialization blocks
    Summarize the key concepts covered in this course

IN THIS COURSE

  • 2m 13s
  • 13m 4s
    In 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
  • Locked
    3.  Instantiating Static Nested Classes in Java
    12m 4s
  • Locked
    4.  Using Multiple Nested Classes within an Outer Class
    8m 44s
  • Locked
    5.  Navigating the Drawbacks of Static Nested Classes
    8m 42s
  • Locked
    6.  Using and Characterizing Inner Classes in Java
    12m 25s
  • Locked
    7.  Accessing Variables from Inner Classes in Java
    12m 25s
  • Locked
    8.  Working with Iterators Implemented as an Inner Class
    9m 52s
  • Locked
    9.  Using and Characterizing Local Classes in Java
    10m 13s
  • Locked
    10.  Accessing Final and Local Fields from Outer Classes
    6m 9s
  • Locked
    11.  Using Access Modifiers and Scopes for Local Classes
    5m 28s
  • Locked
    12.  Using Local Classes Defined in Initialization Blocks
    5m 24s
  • Locked
    13.  Course Summary
    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.

YOU MIGHT ALSO LIKE

Rating 4.6 of 25 users Rating 4.6 of 25 users (25)
Rating 4.5 of 75 users Rating 4.5 of 75 users (75)

PEOPLE WHO VIEWED THIS ALSO VIEWED THESE

Rating 4.4 of 155 users Rating 4.4 of 155 users (155)
Rating 4.4 of 60 users Rating 4.4 of 60 users (60)
Rating 4.5 of 36 users Rating 4.5 of 36 users (36)