Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Knowledge base

Knowledge base

Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.

Entries: 5788

Java

lang.Cloneable: practical reference

lang.Cloneable: practical reference: Cloneable is a marker checked by Object.clone; it provides no public clone method and default cloning is shallow.

Intermediate · Java SE 21 (JLS and Java SE API); examples verified on the repository Java runtime
Java

Comparable — natural ordering of objects

java.lang.Comparable<T> defines objects' natural ordering through compareTo(T o). Its result indicates order, not the distance between values.

Intermediate · Java SE 21; repository runtime, production runtime not attested
Java

java.lang.Enum — string representations of constants

java.lang.Enum is the base class of enumeration types. Learn how the overridable toString() method differs from name(), which returns a constant's exact declared name.

Basic · Java SE 21; repository runtime, production runtime not attested
Java

lang.Error: practical reference

lang.Error: practical reference: Error is the base for serious VM or linkage conditions that applications ordinarily should not catch for recovery.

Intermediate · Java SE 21 (JLS and Java SE API); examples verified on the repository Java runtime
Java

Exception — the base exception class

java.lang.Exception represents conditions an application may want to handle. Learn the distinction between checked and unchecked exceptions and the roles of throw, throws, and catch.

Basic · Java SE 21; repository runtime, production runtime not attested
Java

IllegalArgumentException — invalid argument

IllegalArgumentException signals that a method received an illegal or inappropriate argument. It is an unchecked exception: the compiler does not require callers to catch it or declare it with throws.

Basic · Java SE 21; repository runtime, production runtime not attested
Java

IllegalMonitorStateException — missing monitor ownership

IllegalMonitorStateException indicates, among other cases, a call to wait(), notify(), or notifyAll() without owning the target object's monitor. Fixing it requires synchronization on the correct object, not merely catching the exception.

Intermediate · Java SE 21; repository runtime, production runtime not attested
Java

lang.IllegalStateException: practical reference

lang.IllegalStateException: practical reference: IllegalStateException signals that a call is invalid for the receiver's current state rather than merely for an argument value.

Intermediate · Java SE 21 (JLS and Java SE API); examples verified on the repository Java runtime
Java

IndexOutOfBoundsException — index outside the valid range

IndexOutOfBoundsException signals an index outside the permitted range. Learn its relationship to RuntimeException, its specialized subclasses, and how to validate an array index explicitly.

Basic · Java SE 21; repository runtime, production runtime not attested
Java

InterruptedException — handling thread interruption

InterruptedException is a checked exception signaling interruption of an operation such as Thread.sleep. Learn how the exception differs from the interrupt flag and how to preserve the signal when handling it.

Intermediate · Java SE 21; repository runtime, production runtime not attested
Java

MethodHandle: argument binding and typed invocation

MethodHandle is a typed reference to an operation. Learn how bindTo binds its first argument and how strict invokeExact differs from type-adapting invoke in Java SE 21.

Advanced · Java SE 21; repository runtime, production runtime not attested
Java

MethodHandles — typed handles for methods and fields

MethodHandles provides factories and transformations for handles. A Lookup object controls access when handles are created; findVirtual creates an instance-method handle, while findVarHandle provides access to an instance field.

Advanced · Java SE 21; repository runtime, production runtime not attested
Java

MethodType — describing parameter and return types

java.lang.invoke.MethodType describes a method handle's return type and ordered parameter types. The MethodType.methodType factory creates this immutable description.

Intermediate · Java SE 21; repository runtime, production runtime not attested
Java

VarHandle: acquire-release access and atomic CAS

VarHandle provides typed access to variables with selectable memory ordering. Learn getAcquire, setRelease, and compareAndSet, and distinguish data publication from an atomic update.

Advanced · Java SE 21; repository runtime, production runtime not attested
Java

Iterable — a contract for traversing elements

java.lang.Iterable<T> enables an object to be used in an enhanced for loop. Its iterator() method supplies an iterator, while the default forEach() method applies an action to successive elements.

Basic · Java SE 21; repository runtime, production runtime not attested
Java

java.lang.Math — absolute value and minimum

Math provides static numeric operations. Learn Math.abs and Math.min, including their behavior for extreme integers, NaN, and signed zero.

Basic · Java SE 21; repository runtime, production runtime not attested
Java

NullPointerException — using null instead of an object

NullPointerException (NPE) signals the use of null where an object is required. It extends RuntimeException, so it does not need to be declared in throws.

Basic · Java SE 21; repository runtime, production runtime not attested
Java

lang.Record: practical reference

lang.Record: practical reference: Record is the implicit superclass of record classes, whose state is defined by components and generated value-oriented members.

Intermediate · Java SE 21 (JLS and Java SE API); examples verified on the repository Java runtime
Java

Field — reflective field access in Java

java.lang.reflect.Field describes one field and enables access to its value at runtime. It supports inspecting metadata and annotations and changing values, subject to access-control and module-system restrictions.

Intermediate · Java SE 21; repository runtime, production runtime not attested
Java

InvocationHandler — handling dynamic proxy calls

InvocationHandler defines how a dynamic proxy's methods behave. Learn the InvocationHandler.invoke contract, its arguments, return-value and exception constraints, and handling of Object methods.

Intermediate · Java SE 21; repository runtime, production runtime not attested
Java

java.lang.reflect.Method — inspecting and invoking a method

A Method object represents a method accessed through reflection. It lets you inspect its name and annotations and invoke it at runtime. Suppressing access checks with setAccessible remains subject to module boundaries.

Intermediate · Java SE 21; repository runtime, production runtime not attested
Java

lang.reflect.ParameterizedType: practical reference

lang.reflect.ParameterizedType: practical reference: ParameterizedType models a parameterized type such as List<String>, separating raw type from actual type arguments.

Intermediate · Java SE 21 (JLS and Java SE API); examples verified on the repository Java runtime
Java

java.lang.reflect.Proxy — dynamic interface proxies

Proxy.newProxyInstance creates an object implementing specified interfaces at runtime. Calls go to an InvocationHandler, which determines the result instead of using an ordinary method implementation.

Intermediate · Java SE 21; repository runtime, production runtime not attested