class Array2Demo {
int month_days[];
Array2Demo(){
System.out.println(month_days);
}
public static void main(
String args[]){
Array2Demo ob = new Array2Demo();
}
}
Yes this prints null, I understand that, but what book is refering is not the same. Book is saying about any array refernce is automatically initialized to null. My doubt is not yet clear. Is it so that when array ref created as local needs explicit initialization, and when as instance var. then constrcutor will initialize it?