In Java, you have to initialize a variable before use. There are no default value assigned to variables during declaration.
Itís a good programming practice to initialize variables at declaration time.Code:
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The local variable age may not have been initialized
int age = 0;