O'Reilly logo

The Java® Language Specification, Java SE 7 Edition, Fourth Edition by Alex Buckley, Gilad Bracha, Guy Steele, Bill Joy, James Gosling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required