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.concurrent.Flow: practical reference

util.concurrent.Flow: practical reference: Flow groups Reactive Streams-compatible Publisher, Subscriber, Subscription, and Processor interfaces with demand control.

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

Future — an asynchronous task result

Future<V> represents an asynchronous task result. Future.get retrieves the result, waiting if necessary, while Future.isDone checks completion, which does not necessarily mean success.

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

LinkedBlockingQueue — a blocking FIFO queue

LinkedBlockingQueue is a thread-safe FIFO queue built from linked nodes. It supports an optional capacity bound and operations that wait for space or an element, making it useful for producer–consumer communication.

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

Condition — waiting for lock-protected state

Condition lets a thread wait for a change to shared state protected by a Lock. Learn await, awaitNanos, signal, and signalAll, and why the state check belongs in a loop.

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

Lock — explicit lock acquisition and release

The java.util.concurrent.locks.Lock interface provides explicit control over locking. Learn the lock()/unlock() pair, the safe try/finally pattern, and an example using ReentrantLock to protect a shared counter.

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

ReadWriteLock — separate read and write locks

ReadWriteLock exposes associated read and write locks: multiple readers can share access, while writing requires exclusive access. Learn readLock() and writeLock(), visibility guarantees, and safe lock release.

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

ReentrantLock — explicit reentrant mutual exclusion

ReentrantLock provides mutual exclusion while allowing its owner to acquire the same lock repeatedly. It requires explicit release and also offers tryLock() and associated Condition objects.

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

util.concurrent.locks.ReentrantReadWriteLock: practical reference

util.concurrent.locks.ReentrantReadWriteLock: practical reference: ReentrantReadWriteLock provides a shared read lock and an exclusive write lock with reentrancy.

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

StampedLock — optimistic reading

StampedLock provides exclusive writing, shared reading, and optimistic reading with validation.

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

Phaser — synchronizing work stages

Phaser is a reusable synchronization barrier with a variable number of participants. It lets tasks wait for a stage to finish and deregister when their work ends.

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

util.concurrent.ScheduledExecutorService: practical reference

util.concurrent.ScheduledExecutorService: practical reference: ScheduledExecutorService schedules one-shot tasks after relative delays and recurring tasks periodically.

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

Semaphore — limiting concurrent access

java.util.concurrent.Semaphore limits access using a permit counter. Learn blocking acquire(), nonblocking tryAcquire(), and safe permit return using release().

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

util.concurrent.StructuredTaskScope: practical reference

util.concurrent.StructuredTaskScope: practical reference: StructuredTaskScope<T> is a Java 21 preview API that confines concurrent subtask lifetimes to a structured scope.

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

util.concurrent.SubmissionPublisher: practical reference

util.concurrent.SubmissionPublisher: practical reference: SubmissionPublisher<T> asynchronously delivers non-null items to current Flow.Subscribers through an independent buffer per subscriber.

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

TimeUnit — time units and conversions

TimeUnit describes time units used in operations such as timeouts. It converts long values, truncating fractional parts or saturating on overflow.

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

java.util.Date — reading, changing, and comparing time

Date represents an instant with millisecond precision. Learn to read it with getTime(), change it with setTime(long), and compare it with equals(Object).

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

Deque — double-ended queue and stack

java.util.Deque<E> describes a double-ended queue: elements can be added and removed at either end. The same interface supports a FIFO queue and a LIFO stack; the methods you choose determine the behavior.

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

DoubleSummaryStatistics — statistics for double values

DoubleSummaryStatistics collects the count, sum, minimum, maximum, and average of double values. accept adds a value, while combine merges statistics.

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

EnumMap — a map with enum keys

EnumMap stores keys from one enum type. The example demonstrates construction, insertion, lookup, size, and iteration in enum declaration order.

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

EnumSet — a set of constants from one enum type

EnumSet stores constants of one enum type without duplicates. Learn to create sets with of and allOf and use the add, remove, and contains operations.

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

util.function.BiConsumer: practical reference

util.function.BiConsumer: practical reference: BiConsumer<T,U> is a functional operation that accepts two arguments, returns no result, and is normally intended for side effects.

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

util.function.BiFunction: practical reference

util.function.BiFunction: practical reference: BiFunction<T,U,R> is a functional interface that maps two potentially different argument types to one result R.

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

util.function.BinaryOperator: practical reference

util.function.BinaryOperator: practical reference: BinaryOperator<T> specializes BiFunction<T,T,T> so both operands and the result have the same type.

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