Java - Automatic variable declaration

Variable declaration is used for its creation.

automatic variable declaration

Description

type name =init_value;
type name =init_value , name = init_value;
Used keywords: =
Data:
  • name -

Input

Examples

Java

Automatic variable declaration the possible of use:
xmin = -128; ymax = 127;
byte x= -5;           // x = -5
byte y = -(15 % 4);   // y = -3
y = (byte)(x * y);    // z = 15

Java

Other pieces of example codes:
float y = 123456789;
short y = -(1500 % 60);
boolean b = x;
int y = -(15123 / 70);
long y = -(1512345 / 70);
double y = 123456789;
Automatic variable declaration in another programming language:
Differences to:
Languages: en hu cz sk