Below code
public class Example {
static int[] member;
public static void main(String[] args) {
int[] ic = new int[0];
if (ic == null){
System.out.println("ic is null");
}
System.out.println(ic); // [I@659e0bfd
if(member == null){
System.out.println("member is null");
}
}
}
It is obvious that elements can't be added in zero length array.
What does ic
point to, if ic
is not null
?
As per below diagram, Is ic
pointing to memory location 659e0bfd
(which is empty)?