JavaThe > operator checks whether the left operand is strictly greater than the right and returns boolean. Equal values produce false. It operates on numeric values after numeric promotion; a comparison involving NaN always produces false.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe ++ operator adds 1 to a variable's value. Prefix ++count produces the new value, while postfix count++ produces the previous value; both store the result in the variable.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe != operator returns boolean: it compares numeric or boolean values, while for references it tests object identity rather than contents.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe instanceof operator tests an object's compatibility with a type and returns boolean. A type pattern can also declare a variable available wherever the compiler can prove that matching succeeded. For null, the result is false.
Intermediate · Java SE 21; repository runtime, production runtime not attestedJavaThe -> symbol separates a lambda's parameters from its body. A lambda describes behavior for a functional interface; its body executes when the appropriate method is called, not when the lambda is assigned.
Intermediate · Java SE 21; repository runtime, production runtime not attestedJavaThe << operator shifts an integer's bits left, filling the right side with zeros. The promoted left operand determines the result width and how the shift distance is masked.
Intermediate · Java SE 21; repository runtime, production runtime not attestedJavaThe <<= operator shifts bits left and stores the result in the same variable. If the variable has a primitive type, the result is implicitly converted back to that type.
Intermediate · Java SE 21; repository runtime, production runtime not attestedJavaThe <= operator compares numeric values inclusively. It returns boolean; a comparison involving NaN returns false.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe < operator checks whether its left operand is strictly less than its right operand and returns boolean. Equal values produce false. Floating-point comparisons require care with NaN and signed zeros.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe && operator combines two conditions: the result is true only when both are true. When the left condition is false, the right condition is not evaluated.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe unary ! operator reverses a logical value: true becomes false, and false becomes true. It accepts boolean or Boolean and produces boolean. Applying it to a Boolean whose value is null throws NullPointerException.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe || operator combines conditions using logical OR. When the left operand is true, it skips the right operand; otherwise, it evaluates it.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe notation Type.FIELD / object.member distinguishes static field access through a type name from object field access. Field selection depends on the compile-time type, and instance field access requires a non-null reference.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe :: syntax adapts an existing method, constructor, or array creation operation to a functional interface. It does not invoke the referenced operation immediately; the target type determines compatible parameters and the result.
Intermediate · Java SE 21; repository runtime, production runtime not attestedJavaThe * operator computes the product of two numeric values. Operand types determine the result type; integer overflow does not throw an exception.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe *= operator multiplies a variable's existing value by the right operand and stores the result back, converting it to the variable's type.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe % operator computes the remainder of integer or floating-point division. Its result is not necessarily nonnegative.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe %= operator calculates a remainder and stores it in the left operand, implicitly converting the result.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe >> operator shifts bits right while replicating the sign bit. Learn operand promotion, distance masking, and how it differs from >>> and division.
Intermediate · Java SE 21; repository runtime, production runtime not attestedJavaThe >>= operator shifts bits right with sign extension and stores the result back in the same variable.
Intermediate · Java SE 21; repository runtime, production runtime not attestedJavaThe binary - operator subtracts its right operand from its left operand. Learn numeric promotion, grouping, and integer overflow when subtracting values in Java SE 21.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe -= operator subtracts the right operand from a variable's value and stores the result in that same variable.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe `-x` operator computes arithmetic negation after numeric promotion. It does not change `x`. At the minimum `int` or `long` value, overflow leaves the value unchanged.
Basic · Java SE 21; repository runtime, production runtime not attestedJavaThe expression +x returns the value of x after unary numeric promotion. It neither changes the sign nor increments x, but it can change the result type: byte, short, and char are promoted to int.
Basic · Java SE 21; repository runtime, production runtime not attested