14.4. Local Variable Declaration Statements

A local variable declaration statement declares one or more local variable names.

LocalVariableDeclarationStatement:    LocalVariableDeclaration ;LocalVariableDeclaration:    VariableModifiersopt Type VariableDeclarators

The following are repeated from §8.4.1 and §8.3 to make the presentation here clearer:

VariableModifiers:    VariableModifier    VariableModifiers VariableModifierVariableModifier: one of    Annotation finalVariableDeclarators:    VariableDeclarator    VariableDeclarators, VariableDeclaratorVariableDeclarator:    VariableDeclaratorId    VariableDeclaratorId = VariableInitializerVariableDeclaratorId:    Identifier    VariableDeclaratorId []VariableInitializer:    Expression    ArrayInitializer ...

Get The Java® Language Specification, Java SE 7 Edition, Fourth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.