String — immutable text
String represents immutable text in Java. Learn content versus reference comparison, value conversion, regular expressions, and explicit byte encoding and decoding.
CKTIS / Knowledge base
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
String represents immutable text in Java. Learn content versus reference comparison, value conversion, regular expressions, and explicit byte encoding and decoding.
The `void` keyword indicates that a method returns no value. The method can still perform actions, such as printing text. Do not confuse `void` with the value `null` or with the `java.lang.Void` class.
JavaScript + adds numbers or joins strings. The types of the values determine the result, not whether their characters look like numbers.
AggregateError groups failures from a batch operation while retaining an individual errors list and optional message and cause.
ArrayBuffer reserves zero-filled byte memory that is accessed through a typed array or DataView and can optionally be resizable.
Array.from creates a new array from an iterable or indexed array-like object and can map each value during construction.
Array.isArray performs the internal Array brand test instead of guessing from prototype, constructor, or object shape.
The length property specifies an array's length, but not necessarily the number of existing elements. Assigning to it can delete elements or increase the length without filling the new positions.
Array.of creates a new array where every argument becomes one element, including a single numeric argument.
The at method reads an array element and lets a negative index count from the end without manually using length.
concat creates a new array from its receiver and arguments, spreading arrays by one level without changing the sources.
copyWithin copies elements within the same receiver, preserves its length, and handles overlapping ranges safely.
entries returns an iterator of consecutive index and value pairs, including positions that are holes in a sparse array.
every returns true when the callback is truthy for every existing element; an empty array satisfies the condition.
fill mutates a selected receiver range, writes the same value at every index, and returns the receiver.
filter visits existing elements and returns a dense, shallow array of those whose callback result is truthy.
find returns the first value whose callback result is truthy, or undefined when no match exists.
findIndex returns the first index whose callback is truthy, or -1; it also visits sparse holes as undefined.
findLast searches indexes from the end and returns the first value found in that direction, or undefined.
findLastIndex searches backward and returns the first matching index in that direction, or -1.
flat returns a new shallow array while spreading nested arrays up to a requested depth.
flatMap maps existing elements and spreads arrays returned by the callback by exactly one level.
forEach calls a callback for existing elements, skips holes, and always returns undefined.
includes returns a Boolean indicating whether an array range contains a value under SameValueZero comparison.