Java SE 17 (1Z0-829) study materials
Java SE 17 (1Z0-829) study resources

Java SE 17 (1Z0-829) key terms

Java SE 17 (1Z0-829) · Get comfortable with the vocabulary.

LocalDate

An immutable date without time or zone, storing year, month, and day. Created via LocalDate.of, now, or parse; supports plusDays, minusMonths, and formatting with DateTimeFormatter.

Related: LocalDateTime, DateTimeFormatter
LocalDateTime

An immutable date-time without a time zone, combining LocalDate and LocalTime. Created via of, now, or parse; supports plusHours, withDayOfMonth, and conversion to LocalDate or LocalTime.

Related: LocalDate, ZonedDateTime
ZonedDateTime

An immutable date-time with a time zone, such as America/New_York. Handles daylight saving transitions; created via now, of, or atZone on a LocalDateTime.

Related: ZoneId, Instant
Instant

A point on the UTC timeline, measured in seconds and nanoseconds from the epoch 1970-01-01T00:00:00Z. Commonly used for timestamps; created via now or ofEpochSecond.

Related: Duration, ZonedDateTime
Duration

A time-based amount, such as 2 hours or 30 seconds, stored as seconds and nanoseconds. Created via Duration.ofHours or between; supports plus, minus, and toMinutes.

Related: Period, Instant
Period

A date-based amount in years, months, and days, such as 1 year and 2 months. Created via Period.of or between; supports plus, minus, and getYears.

Related: Duration, LocalDate
DateTimeFormatter

A formatter for printing and parsing date-time objects using patterns like yyyy-MM-dd. Created via ofPattern or predefined constants such as ISO_LOCAL_DATE; immutable and thread-safe.

Related: LocalDate, LocalDateTime
ZoneId

An identifier for a time zone, such as Europe/Paris or a fixed offset like +02:00. Used with ZonedDateTime and to convert between Instant and local date-time.

Related: ZonedDateTime, Instant
String immutability

The property that a String's character content never changes after creation; methods like concat or replace return new strings. Enables safe sharing and caching of string literals.

Related: StringBuilder, String pool
StringBuilder

A mutable sequence of characters with methods like append, insert, and reverse. Not thread-safe; use StringBuffer for synchronized access. toString returns a String snapshot.

Related: String immutability, String pool
String pool

A region of the heap where string literals are stored and reused. The intern method returns a pooled reference; == compares references, not content.

Related: String immutability, equals method
equals method

The method used to compare object content for equality. For strings, equals compares characters; overriding equals requires a consistent hashCode for hash-based collections.

Related: hashCode contract, String pool
hashCode contract

The rule that equal objects must return the same hash code, though unequal objects may share one. Violations break HashMap and HashSet behavior; must be overridden with equals.

Related: equals method, HashMap
List interface

An ordered collection that allows duplicates and positional access via index. Common implementations include ArrayList and LinkedList; supports add, get, set, and remove.

Related: ArrayList, Set interface
ArrayList

A resizable-array implementation of List. Offers fast random access and amortized constant-time append; insertion or removal in the middle shifts elements.

Related: List interface, LinkedList
LinkedList

A doubly linked list implementing List and Deque. Constant-time insertion and removal at ends; slower random access than ArrayList because it traverses nodes.

Related: ArrayList, Deque interface
Set interface

A collection that contains no duplicate elements. Implementations include HashSet, LinkedHashSet, and TreeSet; uniqueness is determined by equals and hashCode.

Related: HashSet, TreeSet
HashSet

A Set backed by a HashMap, offering constant-time add, remove, and contains on average. Iteration order is unspecified; permits one null element.

Related: Set interface, HashMap
TreeSet

A sorted Set backed by a TreeMap. Elements are ordered by natural ordering or a Comparator; operations are O(log n). Does not permit null elements.

Related: Set interface, Comparator
HashMap

A Map implementation storing key-value pairs in a hash table. Allows one null key and multiple null values; average constant-time get and put; iteration order is unspecified.

Related: hashCode contract, TreeMap
TreeMap

A sorted Map backed by a red-black tree. Keys are ordered by natural ordering or a Comparator; operations are O(log n). Does not permit null keys.

Related: HashMap, Comparator
Stream

A sequence of elements supporting sequential and parallel aggregate operations. Created from collections via stream; operations are lazy until a terminal operation is invoked.

Related: Intermediate operation, Terminal operation
Intermediate operation

A stream operation such as filter, map, or sorted that returns another stream and is lazy. It does not execute until a terminal operation is called.

Related: Stream, Terminal operation
Terminal operation

A stream operation such as collect, forEach, or reduce that produces a result or side effect and consumes the stream. A stream cannot be reused after a terminal operation.

Related: Stream, Intermediate operation
Optional

A container that may or may not hold a non-null value. Methods include of, ofNullable, empty, orElse, and ifPresent; helps avoid NullPointerException in stream results.

Related: Stream, Terminal operation
switch statement

A control-flow statement that selects among cases based on a value. Supports byte, short, char, int, String, and enum; requires break to prevent fall-through.

Related: switch expression, yield statement
switch expression

A switch used as an expression that returns a value. Uses arrow labels (case X ->) and must be exhaustive; no fall-through. Introduced in Java 14.

Related: switch statement, yield statement
yield statement

A statement used inside a switch expression block to return a value. Unlike return, it exits the switch expression, not the enclosing method.

Related: switch expression, switch statement
while loop

A loop that evaluates a boolean condition before each iteration and repeats while true. If false initially, the body never executes.

Related: do-while loop, for loop
do-while loop

A loop that executes its body at least once, then repeats while a boolean condition is true. The condition is checked after each iteration.

Related: while loop, for loop
for loop

A loop with initialization, condition, and update sections, or an enhanced form that iterates over arrays and Iterable collections. The enhanced for cannot modify the underlying collection safely.

Related: while loop, break statement
break statement

A statement that exits the innermost loop or switch immediately. With a label, it can exit an outer loop.

Related: continue statement, for loop
continue statement

A statement that skips the rest of the current loop iteration and proceeds to the next iteration. With a label, it can skip to an outer loop.

Related: break statement, for loop
checked exception

An exception that must be either caught or declared in a throws clause. Subclasses of Exception except RuntimeException; compiler enforces handling.

Related: unchecked exception, try-catch-finally
unchecked exception

An exception that does not require explicit handling. Subclasses of RuntimeException and Error; examples include NullPointerException and IllegalArgumentException.

Related: checked exception, try-catch-finally
try-catch-finally

A construct for handling exceptions. The try block contains risky code, catch handles specific exceptions, and finally always executes, even after return or an uncaught exception.

Related: try-with-resources, checked exception
try-with-resources

A try statement that automatically closes resources implementing AutoCloseable at the end. Resources are closed in reverse order of declaration; suppresses close exceptions.

Related: try-catch-finally, AutoCloseable
var

A reserved type name for local variable type inference. The compiler infers the type from the initializer; cannot be used for fields, method parameters, or without an initializer.

Related: Local variable type inference, var in lambda parameters
Local variable type inference

The feature allowing local variables to be declared with var, letting the compiler infer the type. Requires an initializer and cannot infer null or lambda without a target type.

Related: var, var in lambda parameters
var in lambda parameters

The ability to use var in lambda parameter declarations, e.g., (var x, var y) -> x + y. Requires all parameters to use var or none; enables annotations on parameters.

Related: var, Lambda expression
Lambda expression

A concise syntax for implementing a functional interface, e.g., (a, b) -> a + b. Parameter types may be inferred; body can be an expression or block.

Related: Functional interface, var in lambda parameters
Functional interface

An interface with exactly one abstract method, eligible for lambda expressions and method references. May have default and static methods; annotated with @FunctionalInterface optionally.

Related: Lambda expression, Method reference
Method reference

A shorthand for a lambda that invokes an existing method, using syntax like System.out::println or String::length. Four kinds: static, instance, arbitrary object, and constructor.

Related: Lambda expression, Functional interface
Inheritance

A mechanism where a class derives from a superclass, inheriting accessible fields and methods. Java supports single class inheritance; overridden methods use dynamic dispatch.

Related: Polymorphism, Abstract class
Polymorphism

The ability of an object to take multiple forms, enabling a supertype reference to invoke subclass overrides at runtime. Achieved via inheritance and interfaces.

Related: Inheritance, Interface
Interface

A reference type declaring abstract methods, default methods, static methods, and constants. A class can implement multiple interfaces; default methods provide implementations.

Related: Abstract class, Polymorphism
Abstract class

A class that cannot be instantiated and may contain abstract methods. Subclasses must implement abstract methods or also be abstract. Supports constructors and fields.

Related: Interface, Inheritance
Record

A compact class declaration for immutable data, automatically generating constructor, accessors, equals, hashCode, and toString. Introduced in Java 16; cannot extend other classes.

Related: equals method, hashCode contract