In Java, you have to initialize a variable before use. There are no default value assigned to variables during declaration.
int age;
System.out.println(age);
Error:
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.