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

ByteOrder — byte ordering

ByteOrder describes the byte ordering of multibyte values. Learn the difference between BIG_ENDIAN and LITTLE_ENDIAN and how to select data interpretation explicitly in ByteBuffer.

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

Character.charCount — UTF-16 code unit count

Character.charCount(int codePoint) returns the number of char units needed to represent a code point in UTF-16: either 1 or 2. The method does not validate its argument, so its result does not establish that a value is a Unicode code point.

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

CharacterCodingException — encoding and decoding errors

CharacterCodingException is a checked exception in java.nio.charset that extends IOException. It signals a failure when converting between characters and bytes and provides a common catch type for malformed input and unmappable characters.

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

ChronoUnit.DAYS.between — days between dates

ChronoUnit.DAYS.between(start, end) returns the number of complete days as a long. For LocalDate, it calculates the calendar-date difference; an end before the start produces a negative result.

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

Reading class annotations with reflection

Read repeatable annotations as an array and test for a marker annotation. Distinguish inherited lookup from lookup restricted to the class declaration.

Advanced · Java SE 21
Java

Class.cast — checked casting with Class<T>

When you have the target type in a `Class<T>` variable, use `cast` to get a reference of type `T` to the same object. Use `isInstance` to check a non-null value before casting.

Intermediate · Java SE 21