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

Predicate.test() — evaluating a condition

Use `test(T t)` to check a condition against one input. It returns the primitive `boolean` value `true` if the input meets the condition, or `false` if it does not.

Basic · Java SE 21
Java

PrintStream.print — output without ending the line

PrintStream.print writes text or a value without adding a line separator. The print(String) overload prints null as the text "null".

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

PrintStream.printf — formatted output

PrintStream.printf writes data according to a format string, for example to System.out. It controls how numbers and text are presented and allows an explicit locale.

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

PriorityBlockingQueue — a concurrent priority queue

PriorityBlockingQueue is a thread-safe, logically unbounded priority queue. put inserts without waiting for space, while take removes the least available element and waits when the queue is empty.

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

RecursiveTask — a recursive result-bearing task

RecursiveTask<V> represents a fork/join task that returns a result of type V. Its compute() method defines the computation: handle a small problem directly or split it into subtasks and combine their results.

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

Reference: get(), clear(), and reachabilityFence()

Reference provides operations on reference objects. Learn referent retrieval, reference clearing, and strong-reachability control in Java SE 21.

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

ReferenceQueue — receiving reference objects

ReferenceQueue lets you retrieve registered reference objects after the garbage collector or an explicit enqueue() adds them. Learn the difference between nonblocking poll() and the blocking remove() variants.

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

Reference.reachabilityFence — preserving strong reachability

Reference.reachabilityFence(ref) keeps an object strongly reachable at least until the call completes. It is useful when premature reclamation could interfere with an operation.

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

Array.newInstance — creating arrays dynamically

Array.newInstance creates arrays from a Class<?> object. It supports primitive types, reference types, and multiple dimensions.

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

Java reflection: accessing fields and methods

In Java SE 21, `Field` and `Method` let you inspect metadata and annotations, change field values, and invoke methods. Finding a private member does not grant access, and `setAccessible(true)` is subject to module rules.

Advanced · Java SE 21
Java

ResolverStyle — strict date resolution

ResolverStyle controls how parsed fields become a date or time. The behavior of ResolverStyle.STRICT depends on the fields: for an ISO calendar date given as year, month, and day, it rejects February 29 in a non-leap year.

Intermediate · Java SE 21 (documentation scope); repository and production runtimes not attested
Java

Closing a scanner: Scanner.close()

`Scanner.close()` closes a scanner and can also close its input source. Learn when to call it and why shared standard input needs special care.

Basic · Java SE 21
Java

Scanner.nextDouble() — read a double value

`Scanner.nextDouble()` reads the next input token as a primitive `double`. The scanner’s locale controls which decimal and grouping separators it recognizes.

Basic · Java SE 21
Java

Scanner.nextInt(): read an integer

Read the next token as an `int`, check whether it is valid before reading, and see why a following `nextLine()` can return an empty string.

Basic · Java SE 21