Is it true that the assigned final object field may still be null inside a constructor?
- by Tom Brito
Is it true that the assigned final object field may still be null inside a constructor?
class MyClass {
private final Object obj = new Object();
public MyClass() {
System.out.println(obj); // may print null?
}
}
if yes, isn't this a bug?