Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / Java

Knowledge base — Java

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

Entries: 813

Java

Class.getName() — type names in Java

`Class.getName()` returns the name of the represented type. For ordinary classes and interfaces, this is the binary name; arrays use a different notation.

Intermediate · Java SE 21
Java

Cleaner — explicit and fallback cleanup

Cleaner registers a cleanup action. Invoke it explicitly through Cleanable.clean(); automatic execution is a fallback mechanism.

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

CodingErrorAction: reporting and replacing invalid input

CodingErrorAction controls how a charset decoder or encoder handles coding errors. REPORT exposes an error to the caller, while REPLACE substitutes the configured replacement and continues processing. Malformed input and unmappable characters have independently configured policies.

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

Collection.spliterator — traversing collection elements

Collection.spliterator() returns an object for traversing collection elements and potentially partitioning the work. Learn the default implementation, size characteristics, and limitations around modification and concurrency.

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

Collections.sort — sorting a list in Java

Sort an existing list by its elements’ natural order or by a comparator. Both overloads modify the same list and preserve the relative order of elements that compare as equal.

Basic · Java SE 21
Java

Collectors.collectingAndThen: practical reference

Collectors.collectingAndThen: practical reference: Collectors.collectingAndThen adapts a downstream collector and applies a finishing function exactly once to its completed result; the returned collector does not retain IDENTITY_FINISH.

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

Collectors.counting: practical reference

Collectors.counting: practical reference: Collectors.counting returns a collector equivalent to reducing every element to 1L and summing, so its result type is Long.

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

Collectors.groupingBy: practical reference

Collectors.groupingBy: practical reference: Collectors.groupingBy classifies each element by a key function and accumulates a Map from keys to group results; its overloads select the map supplier and downstream collector.

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

Concurrent grouping and counting in Java

`Collectors.groupingByConcurrent` groups stream elements by key and can count each category without preserving the order in which elements are encountered.

Advanced · Java SE 21
Java

Collectors.joining: practical reference

Collectors.joining: practical reference: Collectors.joining concatenates CharSequence elements, optionally inserting a delimiter and surrounding the result with a prefix and suffix.

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