1Z0-771 key terms
1Z0-771 · Get comfortable with the vocabulary.
- primitive type
- Related: wrapper class, autoboxing
One of the eight basic data types in Java (byte, short, int, long, float, double, char, boolean) that store raw values directly, not objects, and have fixed memory sizes and default values.
- wrapper class
- Related: autoboxing, primitive type
A class that encapsulates a primitive value as an object, such as Integer for int or Character for char, providing utility methods and allowing primitives to be used in generic collections.
- autoboxing
- Related: wrapper class
The automatic conversion between a primitive and its corresponding wrapper class by the compiler, such as converting an int to an Integer when needed, and unboxing in the reverse direction.
- var keyword
A reserved type name introduced in Java 10 that allows local variable type inference, where the compiler deduces the type from the initializer, but the variable remains statically typed.
- switch expression
- Related: pattern matching for switch, yield statement
A form of switch introduced in Java 14 that returns a value, uses arrow syntax for cases, supports multiple labels, and must be exhaustive for enums and sealed types.
- yield statement
- Related: switch expression
A statement used inside a switch expression's block to provide the resulting value, terminating the block and acting like a return for the switch expression.
- pattern matching for switch
- Related: switch expression, sealed class
A feature allowing switch cases to test the type of the selector and bind a variable if the type matches, enabling concise conditional extraction and exhaustive analysis with sealed types.
- try-with-resources
- Related: AutoCloseable, suppressed exception
A try statement that declares one or more resources which are automatically closed at the end of the block, provided they implement AutoCloseable, simplifying resource management and exception handling.
- suppressed exception
- Related: try-with-resources
An exception that is thrown during the closing of a resource in a try-with-resources statement but is not the primary exception; it is attached to the primary exception via addSuppressed.
- sealed class
- Related: pattern matching for switch, record
A class or interface that restricts which other classes or interfaces may extend or implement it, specified with a permits clause, enabling exhaustive pattern matching and controlled inheritance.
- record
- Related: sealed class, compact constructor
A special kind of class introduced in Java 16 that acts as a transparent carrier for immutable data, automatically generating a canonical constructor, accessors, equals, hashCode, and toString.
- compact constructor
- Related: record
A constructor in a record that omits the parameter list and is used to validate or normalize parameters before the implicit field assignments, reducing boilerplate.
- interface default method
- Related: interface static method
A method in an interface with a body, marked with the default keyword, allowing interfaces to evolve without breaking implementing classes, and can be overridden by implementors.
- interface static method
- Related: interface default method
A static method defined in an interface that is not inherited by implementing classes or subinterfaces and must be invoked with the interface name.
- type erasure
- Related: generic type, unbounded wildcard
The process by which the Java compiler removes generic type information during compilation, replacing type parameters with their bounds or Object, ensuring binary compatibility with pre-generics code.
- generic type
- Related: type erasure, bounded type parameter
A class, interface, or method that is parameterized over types, allowing code to be reused with different types while providing compile-time type safety.
- bounded type parameter
- Related: generic type, wildcard
A type parameter restricted to a specific type or its subtypes using the extends keyword, such as , enabling invocation of methods declared in the bound.
- wildcard
- Related: bounded type parameter, unbounded wildcard
A question mark (?) used in generic type arguments to represent an unknown type, often combined with extends or super to restrict the acceptable types.
- unbounded wildcard
- Related: wildcard
The wildcard ? without any bound, representing any type, used when the code does not depend on the type parameter and only requires methods from Object.
- functional interface
- Related: lambda expression, method reference
An interface with exactly one abstract method, which can be implemented by a lambda expression or method reference, and may be annotated with @FunctionalInterface for compiler checking.
- lambda expression
- Related: functional interface, method reference
A concise anonymous function that implements a functional interface, consisting of a parameter list, an arrow token, and a body, allowing behavior to be passed as code.
- method reference
- Related: lambda expression, functional interface
A shorthand notation for a lambda expression that invokes an existing method, using the :: operator, such as System.out::println, which can refer to static, instance, or constructor methods.
- Stream pipeline
- Related: intermediate operation, terminal operation
A sequence of operations on a stream consisting of a source, zero or more intermediate operations that return a new stream, and a terminal operation that produces a result or side effect.
- intermediate operation
- Related: Stream pipeline, terminal operation
A stream operation that transforms or filters a stream and returns a new stream, such as filter or map, and is lazy, executing only when a terminal operation is invoked.
- terminal operation
- Related: Stream pipeline, intermediate operation
A stream operation that consumes the stream and produces a result or side effect, such as collect, forEach, or reduce, after which the stream cannot be reused.
- thread
- Related: Runnable, synchronized
The smallest unit of execution within a process, represented by the Thread class, which can run concurrently with other threads and shares the process's memory.
- Runnable
- Related: thread, Callable
A functional interface representing a task that can be executed by a thread, defining a single run method with no return value or checked exceptions.
- Callable
- Related: Future, Runnable
A functional interface similar to Runnable but can return a result and throw checked exceptions, often used with ExecutorService to obtain a Future.
- Future
- Related: Callable, CompletableFuture
An interface representing the result of an asynchronous computation, providing methods to check completion, cancel, and retrieve the result, which may block until ready.
- CompletableFuture
- Related: Future
A class implementing Future and CompletionStage that supports chaining asynchronous computations, combining multiple futures, and handling results or errors in a functional style.
- synchronized
- Related: thread, volatile
A keyword that provides mutual exclusion, ensuring that only one thread at a time executes a block or method, and also establishes a happens-before relationship for memory visibility.
- volatile
- Related: synchronized
A field modifier that ensures visibility of changes across threads by preventing caching and reordering, but does not provide atomicity for compound operations.
- Path
- Related: Files, serialization
An interface in the java.nio.file package representing a hierarchical sequence of directory and file names, used to locate a file or directory in a file system.
- Files
- Related: Path
A utility class in java.nio.file providing static methods for file operations such as reading, writing, copying, moving, and checking file attributes.
- serialization
- Related: deserialization, serialVersionUID
The process of converting an object's state into a byte stream for storage or transmission, enabled by implementing the Serializable interface, with special handling for transient fields.
- deserialization
- Related: serialization
The reverse process of serialization, reconstructing an object from a byte stream, which requires the class to be available and can invoke readObject for custom logic.
- serialVersionUID
- Related: serialization
A static final long field in a Serializable class used to verify version compatibility between the serialized and deserialized classes; if absent, it is computed automatically.
- module
- Related: module-info.java, exports directive
A named, self-describing collection of code and data, declared in a module-info.java file, that specifies which packages it exports and which modules it requires.
- module-info.java
- Related: module, exports directive
The descriptor file for a Java module, containing directives such as requires, exports, opens, uses, and provides, compiled into a module descriptor.
- exports directive
- Related: module-info.java
A module declaration directive that makes a package available to other modules, optionally restricted to specific modules with a to clause.
- annotation
- Related: retention policy, reflection
A form of metadata that can be added to Java code elements, such as classes or methods, and can be processed at compile time or runtime via reflection.
- retention policy
- Related: annotation, reflection
An annotation meta-annotation that specifies how long an annotation is retained: SOURCE (discarded by compiler), CLASS (in class file but not runtime), or RUNTIME (available via reflection).
- reflection
- Related: annotation
The ability of a program to inspect and manipulate its own structure at runtime, using classes like Class, Method, and Field to discover and invoke members dynamically.
- LocalDate
- Related: DateTimeFormatter, ZonedDateTime
An immutable date-time object in java.time representing a date without time or time zone, such as 2025-01-01, and providing methods for date arithmetic.
- DateTimeFormatter
- Related: LocalDate
A class in java.time.format used to format and parse date-time objects, supporting predefined constants and custom patterns.
- ZonedDateTime
- Related: LocalDate
An immutable representation of a date-time with a time zone in the ISO-8601 calendar system, handling daylight saving time and offset transitions.