Java Inner Classes, Lambdas & Closures

0.0(0)
studied byStudied by 0 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/9

flashcard set

Earn XP

Description and Tags

These flashcards cover key concepts related to Java inner classes, lambda expressions, and closures.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

10 Terms

1
New cards

Static Nested Class

A nested class defined with the static modifier, which can only access static members of the outer class.

2
New cards

Non-Static Inner Class

A nested class that is associated with an instance of its enclosing class and can access both static and non-static members.

3
New cards

Anonymous Inner Class

A class without a name, used for one-time use, typically implementing an interface or extending a class.

4
New cards

Lambda Expression

A concise way to represent an anonymous function; allows you to create instances of functional interfaces.

5
New cards

Captured Variables

Variables from the enclosing scope that are used inside a lambda expression.

6
New cards

Effectively Final

A variable that is not modified after its initialization, which allows it to be used in a lambda expression.

7
New cards

Shadowing

A situation where a local variable or inner class field hides a variable from the outer class.

8
New cards

Invoke-Dynamic

A bytecode optimization used by lambda expressions that avoids creating a new object at runtime.

9
New cards

Functional Interface

An interface with exactly one abstract method, which can be implemented by a lambda expression.

10
New cards

Method Reference

A shorthand notation of a lambda expression to call a method directly, e.g., System.out::println.