Much of the work in a program is done by evaluating expressions, either for their side effects, such as assignments to variables, or for their values, which can be used as arguments or operands in larger expressions, or to affect the execution sequence in statements, or both.
This chapter specifies the meanings of expressions and the rules for their evaluation.
Sections:
- 15.1. Evaluation, Denotation, and Result
- 15.2. Forms of Expressions
- 15.3. Type of an Expression
- 15.4. FP-strict Expressions
- 15.5. Expressions and Run-Time Checks
- 15.6. Normal and Abrupt Completion of Evaluation
- 15.7. Evaluation Order
- 15.8. Primary Expressions
- 15.9. Class Instance Creation Expressions
- 15.10. Array Creation and Access Expressions
- 15.11. Field Access Expressions
- 15.12. Method Invocation Expressions
- 15.13. Method Reference Expressions
- 15.14. Postfix Expressions
- 15.15. Unary Operators
- 15.16. Cast Expressions
- 15.17. Multiplicative Operators
- 15.18. Additive Operators
- 15.19. Shift Operators
- 15.20. Relational Operators
- 15.21. Equality Operators
- 15.22. Bitwise and Logical Operators
- 15.23. Conditional-And Operator &&
- 15.24. Conditional-Or Operator ||
- 15.25. Conditional Operator ? :
- 15.26. Assignment Operators
- 15.27. Lambda Expressions
- 15.28. Constant Expressions