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

io.BufferedReader: practical reference

io.BufferedReader: practical reference: BufferedReader buffers characters from a Reader and adds readLine; null means end of stream, while an empty line is returned as an empty string.

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

io.BufferedWriter: practical reference

io.BufferedWriter: practical reference: BufferedWriter buffers characters before forwarding them to a Writer; flush or close is required when downstream visibility matters.

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

ByteArrayOutputStream — writing bytes in memory

ByteArrayOutputStream collects bytes in memory. Learn writing, independent data snapshots, and why close() has no effect.

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

io.InputStream: practical reference

io.InputStream: practical reference: InputStream is the base byte-input abstraction; read returns 0..255 or -1 at end of stream, and bulk reads may be partial.

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

io.IOException: practical reference

io.IOException: practical reference: IOException is the checked base exception for failed or interrupted I/O operations.

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

ObjectInputStream — deserializing objects

ObjectInputStream reconstructs objects from Java's binary serialization stream. Learn readObject(), exception handling, and closure through close(), while recognizing that deserializing untrusted data is dangerous.

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

ObjectOutputStream — writing Java objects

ObjectOutputStream writes objects as a Java serialization byte stream. Learn writeObject, the distinction between flush and close, and automatic closure with try-with-resources.

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

io.OutputStream: practical reference

io.OutputStream: practical reference: OutputStream is the base byte-output abstraction; close can release external resources and flush pushes buffered bytes.

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

io.Reader: practical reference

io.Reader: practical reference: Reader is the base character-input abstraction; read returns UTF-16 code units or -1 and does not itself select a byte encoding.

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

io.Serializable: practical reference

io.Serializable: practical reference: Serializable is a marker enabling Java object serialization, but it does not promise a stable or safe cross-version format.

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

io.StringReader: practical reference

io.StringReader: practical reference: StringReader presents a String as a character Reader without external I/O.

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

io.StringWriter: practical reference

io.StringWriter: practical reference: StringWriter collects characters in a StringBuffer; close has no effect and getBuffer exposes mutable backing storage.

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

io.Writer: practical reference

io.Writer: practical reference: Writer is the base character-output abstraction and may buffer data that must be flushed or closed.

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

lang.ArithmeticException: practical reference

lang.ArithmeticException: practical reference: ArithmeticException signals an exceptional arithmetic condition such as integral division by zero; floating-point division follows IEEE 754.

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

ArrayIndexOutOfBoundsException — array index out of range

ArrayIndexOutOfBoundsException signals array access with a negative index or an index greater than or equal to the array length. A valid index satisfies 0 <= index && index < array.length.

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

lang.AssertionError: practical reference

lang.AssertionError: practical reference: AssertionError is thrown when an enabled assert statement fails and should not replace validation of external input.

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

AutoCloseable — closing resources

java.lang.AutoCloseable defines a resource-closing contract through close(). In try-with-resources, Java calls this method when leaving the block, including because of an exception, and closes multiple resources in reverse order.

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

java.lang.Class — runtime type information

Class<T> represents a type in a running program. It supports object checks and casts, plus inspection of names, member declarations, generic supertypes, and annotations. This entry targets Java SE 21; the repository runtime does not attest the production runtime.

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

lang.ClassCastException: practical reference

lang.ClassCastException: practical reference: ClassCastException signals a run-time cast whose object is incompatible with the requested reference type.

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