In Java, you have to initialize a variable before use. There are no default value assigned to variables during declaration.

Java Code:
int age;

Java Code:
Exception in thread "main" java.lang.Error: Unresolved compilation problem: 
The local variable age may not have been initialized
Itís a good programming practice to initialize variables at declaration time.

Java Code:
int age = 0;