java initialize variable without value
// you must initialize local variables before you use them
public class Variables{
public static void main(String[] args){
// variable declaration
int i;
// this will result in an error
// because variable 'i' is not initalizied yet
System.out.println("i = " + i);
// variable initalization
i = 0;
// output: i = 0
return System.out.println("i = " + i);
}
}