---
spec: JLS
title: "The Java Language Specification"
edition: "Java SE 8 Edition"
java_version: 8
chapter: "Chapter 15. Expressions"
section: "15.2"
heading: "15.2. Forms of Expressions"
parent: "Chapter 15. Expressions"
source: https://docs.oracle.com/javase/specs/jls/se8/html/jls-15.html#jls-15.2
id: "15.2"
url: https://jvm.obfuscated.software/jls/se8/15.2.html
raw: https://jvm.obfuscated.software/jls/se8/15.2.md
---

# 15.2. Forms of Expressions

Expressions can be broadly categorized into one of the following syntactic forms:

- Expression names ([§6.5.6](6.5.6.md))
- Primary expressions ([§15.8](15.8.md) - [§15.13](15.13.md))
- Unary operator expressions ([§15.14](15.14.md) - [§15.16](15.16.md))
- Binary operator expressions ([§15.17](15.17.md) - [§15.24](15.24.md), and [§15.26](15.26.md))
- Ternary operator expressions ([§15.25](15.25.md))
- Lambda expressions ([§15.27](15.27.md))

Precedence among operators is managed by a hierarchy of grammar productions. The lowest precedence operator is the arrow of a lambda expression (`->`), followed by the assignment operators. Thus, all expressions are syntactically included in the *LambdaExpression* and *AssignmentExpression* nonterminals:

```
Expression:
  LambdaExpression
  AssignmentExpression
```

When some expressions appear in certain contexts, they are considered *poly expressions*. The following forms of expressions may be poly expressions:

- Parenthesized expressions ([§15.8.5](15.8.5.md))
- Class instance creation expressions ([§15.9](15.9.md))
- Method invocation expressions ([§15.12](15.12.md))
- Method reference expressions ([§15.13](15.13.md))
- Conditional expressions ([§15.25](15.25.md))
- Lambda expressions ([§15.27](15.27.md))

The rules determining whether an expression of one of these forms is a poly expression are given in the individual sections that specify these forms of expressions.

Expressions that are not poly expressions are *standalone expressions*. Standalone expressions are expressions of the forms above when determined not to be poly expressions, as well as all expressions of all other forms. Expressions of all other forms are said to have a *standalone form*.

Some expressions have a value that can be determined at compile time. These are *constant expressions* ([§15.28](15.28.md)).
