Variables
- Each variable in Java has a specific type, which determines the size and layout of the variable's memory; the range of values that can be stored within that memory; and the set of operations that can be applied to the variable.
- You must declare all variables before they can be used.
- To declare more than one variable of the specified type, you can use a comma-separated list.
Related concepts
→
Variables
→
- Local Variables
- Instance Variables
- Class/Static Variables
- Expressions
- Class: Declaring Member Variables
- Class: Defining Methods
- Object: Creating Objects
- Static Nested Classes
- Inner Classes
- Enum Types
- Synchronized Methods
- Lambda Expressions: Accessing Local Variables of the Enclosing Scope
- Creating Objects: Declaring a Variable to Refer to an Object
Semantic portal