![]() |
syntactic unit > declaration > variable declaration |
![]() ![]() | ||||
variable declaration | ||||
subject | fact |
variable declaration | can be placed practically anywhere in Java source code although it is good practice to only declare variables at the beginning of blocks ![]() | ![]() |
has example int anInteger; | ![]() | |
has example Rectangle rect = new Rectangle(); | ![]() | |
has purpose to declare a variable | ![]() | |
has syntax accessLevel static final transient volatile type variableName | ![]() | |
is a subtopic of Variables and Data Types | ![]() | |
is a kind of declaration | ![]() | |
must contain the type name and the variable name | ![]() | |
declaration | is part of definition | ![]() |
syntactic unit | has syntax rule bold = mandatory | ![]() |
Kinds of variable declaration :