Why not NullPointerException?
Posted: Wed May 03, 2017 8:36 pm
Could somebody explains why "null" string is put in result of following line (why not an exception?) :
public class Test{
int[] ia = new int[1];
Object oA[] = new Object[1];
boolean bool;
public static void main(String args[]){
Test test = new Test();
System.out.println(test.ia[0] + " " + test.oA[0]+" "+test.bool);
}
}
public class Test{
int[] ia = new int[1];
Object oA[] = new Object[1];
boolean bool;
public static void main(String args[]){
Test test = new Test();
System.out.println(test.ia[0] + " " + test.oA[0]+" "+test.bool);
}
}