Can nebody plz explain y this code doesn't give compiler error, saying int temp in constructor may not have been initialized.
is it because its assigned a static value into it?
public class Test3 {
static int total = 10;
public static void main (
String args []) {
new Test3();
}
public Test3 () {
System.out.println("In test");
System.out.println(this);
int temp = this.total;
if (temp > 5) {
System.out.println(temp);
}
}
}