1
visibility

class Main {
public static void main(String args[]) {
int t;
System.out.println(t);
}
}

  • 0

  • garbage value

  • compiler error

  • runtime error

Unlike class members, local variables of methods must be assigned a value to before they are accessed, or it is a compile error.