operators
5 tutorials tagged “operators”.
- Increment and Decrement OperatorsHow ++ and -- work, the difference between pre-increment (++x) and post-increment (x++), how to predict tricky expressions, and the classic interview puzzles.
- Java OperatorsThe families of operators in Java: arithmetic, relational, logical, assignment, bitwise and shift, with what each one does and the result type it produces.
- Operator Precedence and AssociativityWhich operator runs first in Java: the precedence table, left and right associativity, evaluating expressions by hand, and when to add brackets.
- Short-Circuit EvaluationHow && and || stop as soon as the answer is known, how that protects null checks and expensive calls, and how & and | differ by always evaluating both sides.
- Ternary OperatorThe ternary operator condition ? a : b: how it picks one of two values, when it reads better than if-else, the type of its result, and why nesting it hurts.