Java - Automatic variable

Automatic variable declaration is allowed almost anywhere, lifetime is usually from the declaration to the end of the current block.

Declaration

automatic variable declaration Variable declaration is used for its creation.

type name =init_value;
type name =init_value , name = init_value;

Use

variable use Using variables, you can access the data stored in a variable, can be used to store or retrieve the value.

name