Search

Variable Declaration in java



Variable Declaration in java

Here i will give you all idea related to variable declaration in java. Variable is an identifier which holds data or another one variable is an identifiers whose value can be changed at the execution time of program. Variable is an identifier which can be used to identifie input data in a program

Syntax:

Variable_name = value ;

Rules to declare a Variable


1. Every variable name should start with either alphabets or underscore ( _ ) or dollar ( $ ) symbol.

2. No space are allowed in the variable declarations.

3. Except underscore ( _ ) no special symbol are allowed in the middle of variable declaration

4. Variable name always should exist in the left hand side of assignment operators.

5. Maximum length of variable is 64 characters.

6. No keywords should access variable name.