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

util.OptionalDouble: practical reference

util.OptionalDouble: practical reference: OptionalDouble is a value-based container for one primitive double or absence, without boxing to Double.

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

util.OptionalInt: practical reference

util.OptionalInt: practical reference: OptionalInt represents one present primitive int or absence and avoids creating an Integer object.

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

util.OptionalLong: practical reference

util.OptionalLong: practical reference: OptionalLong stores one present primitive long or an empty state without boxing to Long.

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

util.PriorityQueue: practical reference

util.PriorityQueue: practical reference: PriorityQueue<E> is an unbounded heap queue whose head is the least element under natural ordering or the supplied Comparator.

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

Queue — inserting, inspecting, and retrieving elements

The java.util.Queue interface describes a queue of elements awaiting processing. Learn how offer differs from add and poll differs from remove, how peek inspects the head, and how isEmpty checks whether the queue contains elements.

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

util.Random: practical reference

util.Random: practical reference: Random generates a pseudorandom sequence with a 48-bit linear algorithm; the same seed and identical call sequence produce the same values.

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

Matcher — checking text and reading matches

java.util.regex.Matcher applies a regular expression to text. matches() checks the entire region, find() searches for successive substrings, and group() reads the result of a successful match.

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

Pattern — a compiled regular expression

java.util.regex.Pattern stores a compiled regular expression. Pattern.compile creates the pattern, and Pattern.matcher creates a Matcher for checking an entire input or searching for matching subsequences.

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

util.regex.PatternSyntaxException: practical reference

util.regex.PatternSyntaxException: practical reference: PatternSyntaxException is an unchecked IllegalArgumentException that reports a syntax error while a regular-expression pattern is compiled.

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

Scanner — reading numbers and lines

java.util.Scanner reads text tokens and lines. Distinguish reading a number from reading the remainder of a line, and configure number formatting explicitly.

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

util.SequencedCollection: practical reference

util.SequencedCollection: practical reference: SequencedCollection<E> defines a collection with a well-defined encounter order, operations at both ends, and a reverse-ordered view.

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

util.SequencedMap: practical reference

util.SequencedMap: practical reference: SequencedMap<K,V> is a map with a defined encounter order for mappings, operations on its first and last entries, and a reverse-ordered view.

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

util.SequencedSet: practical reference

util.SequencedSet: practical reference: SequencedSet<E> combines Set uniqueness with a defined encounter order, end operations, and a reversed view whose type remains SequencedSet.

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

util.ServiceLoader: practical reference

util.ServiceLoader: practical reference: ServiceLoader<S> locates zero, one, or many service providers in the runtime environment and loads them lazily without exposing implementation locations.

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

java.util.Set — a collection without duplicates

Set<E> describes a collection of unique elements. Learn how to add, check, remove, and count elements, and distinguish the Set interface from the HashSet implementation.

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

SortedMap — a map ordered by keys

SortedMap orders keys by their natural ordering or a comparator. firstKey() and lastKey() return the endpoint keys in that ordering; both throw an exception for an empty map.

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

Spliterator — traversing elements and partitioning work

java.util.Spliterator supports reading elements and partitioning the remaining range. Source characteristics describe properties such as ordering and size accuracy; splitting alone does not start parallel execution.

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

Collector — custom mutable stream reduction

Collector<T, A, R> describes accumulating stream elements into mutable state and transforming it into a result. Learn the collector functions, parallel-processing requirements, and the meaning of its characteristics in Java SE 21.

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

Collectors: summary statistics and concurrent grouping

The java.util.stream.Collectors class supplies collectors for Stream.collect. Combine Collectors.groupingByConcurrent with Collectors.summarizingDouble to calculate numeric summary statistics separately for each group.

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

DoubleStream — filtering, counting, and averaging

DoubleStream processes primitive double values through a lazy pipeline. Learn stream creation, filtering, and the terminal operations count() and average().

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

IntStream — filtering and aggregating int values

IntStream processes primitive int values. It supports filtering data, testing conditions, and calculating element counts, sums, and averages.

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

LongStream — creating and summing a stream of long values

LongStream processes primitive long values rather than Long objects. LongStream.of creates a stream from supplied values, and LongStream.sum completes processing and returns their sum as a long.

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

Stream — element-processing pipelines

Stream<T> processes object references through a lazy pipeline. Learn stream creation, result arrays, primitive mappings, and encounter-order guarantees.

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

util.StringJoiner: practical reference

util.StringJoiner: practical reference: StringJoiner builds text from elements separated by a delimiter and optional prefix and suffix.

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