I'm trying to learn Java 8 (moving from C -> Java). I tried:
public class Test {
public static void main(String[] args){
int i;
System.out.println(i);
}
}
Gives a compiler error saying the variable "i" has not been initialized. I thought that one of the nice things about Java was that it would auto-initialize primitives to a default value.