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

Runnable — a task without a return value

Runnable describes an operation with no parameters and no return value. Its run() method defines the task's action; calling that method alone does not start a new thread.

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

lang.RuntimeException: practical reference

lang.RuntimeException: practical reference: RuntimeException is the unchecked exception base; callers are not required to catch or declare it.

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

StackOverflowError — call stack overflow

The JVM can throw StackOverflowError when a computation needs more stack space than the thread is allowed. Deep recursion is a common cause, but a sufficiently deep nonrecursive call chain can also overflow the stack. The error belongs to the Error hierarchy, not Exception; addressing it usually means fixing the method-call structure rather than catching the error.

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

lang.StrictMath: practical reference

lang.StrictMath: practical reference: StrictMath provides reproducible core transcendental algorithms with specified fdlibm-based results where documented.

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

lang.StringBuffer: practical reference

lang.StringBuffer: practical reference: StringBuffer is a mutable synchronized character sequence; individual methods are synchronized but compound protocols need coordination.

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

StringBuilder — a mutable text buffer

StringBuilder lets you build and modify text incrementally. Learn the difference between length and capacity, and what happens when setLength truncates or extends the sequence.

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

lang.System: practical reference

lang.System: practical reference: System exposes standard streams, properties, environment, time sources, array copying, and VM-level utilities.

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

Thread — starting and coordinating threads

java.lang.Thread represents a thread of execution. Learn to create a thread with Runnable, launch it with start(), wait with join(), and use cooperative interruption without relying on timing delays.

Basic · Java SE 21 (repository runtime); production runtime not attested
Java

ThreadLocal — a value associated with a thread

ThreadLocal stores a separate value for each thread. Learn lazy initialization, reading, writing, and removal, and why cleanup matters for tasks running in a thread pool.

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

Throwable: message, cause, and suppressed exceptions

java.lang.Throwable is the base of the exception and error hierarchy. Distinguish its message, cause, and suppressed exceptions.

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

BigDecimal — decimal arithmetic and rounding

java.math.BigDecimal supports arbitrary-precision decimal numbers, useful for monetary calculations and similar tasks. Learn value construction, arithmetic, scale, comparison, and explicit rounding.

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

math.BigInteger: practical reference

math.BigInteger: practical reference: BigInteger represents immutable arbitrary-precision integers and defines two-complement-style bit operations.

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

math.MathContext: practical reference

math.MathContext: practical reference: MathContext combines decimal precision and rounding mode for BigDecimal operations; precision zero means unlimited.

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

RoundingMode — decimal rounding policies

java.math.RoundingMode specifies a rounding policy used by APIs such as BigDecimal. HALF_UP chooses the nearest value and breaks ties away from zero, including for negative numbers.

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

MalformedURLException — URL construction failure

MalformedURLException is a checked exception in java.net that extends IOException. It signals a URL construction problem, such as an unrecognized protocol or input rejected by its handler; it does not mean that a connection failed.

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

URL(String): creating a URL object from text

java.net.URL(String) creates a URL object from text. The constructor has been deprecated since Java 20; Java SE 21 recommends using URI and converting with toURL().

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

nio.Buffer: practical reference

nio.Buffer: practical reference: Buffer is the base NIO buffer state machine, maintaining capacity, limit, position, and an optional mark.

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

ByteBuffer — binary data and buffer state

ByteBuffer stores bytes and supports reading and writing binary values. Learn buffer creation, byte order, and how flip, clear, and compact control position and limit.

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

nio.ByteOrder: practical reference

nio.ByteOrder: practical reference: ByteOrder represents BIG_ENDIAN and LITTLE_ENDIAN ordering for multibyte buffer access.

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

CharBuffer: data ranges and shared views

CharBuffer holds char values within a range controlled by position and limit. Learn position-relative indexing and the difference between a shared read-only view and a copy of the data.

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

Charset — encoding and decoding text

java.nio.charset.Charset describes a mapping between Unicode code units and bytes. Learn how Charset.forName selects an encoding and how to create a decoder and encoder with explicit error handling.

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

CharsetDecoder — decoding bytes with error control

CharsetDecoder converts bytes in a selected charset into Unicode characters. It independently configures handling of malformed and unmappable sequences: reporting errors, replacing input, or ignoring input.

Intermediate · Documentation target: Java SE 21; repository and production runtime versions are not attested.
Java

CharsetEncoder — encoding characters into bytes

CharsetEncoder converts Unicode characters into bytes in a selected charset. It supports explicit error handling and encoding either a complete buffer or successive chunks of text.

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

StandardCharsets — choosing a text encoding explicitly

StandardCharsets provides ready-made Charset objects for standard encodings required by the Java platform. Use StandardCharsets.UTF_8 or StandardCharsets.UTF_16BE to specify explicitly how text becomes bytes and how bytes become text.

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