If I declare Arraylist like this-
private ArrayList<Integer[]> nodeList;
then, while adding array into it, getting NullPointerException
But, if I change it to-
private ArrayList<Integer[]> nodeList= new ArrayList<Integer[]>();
-it works fine.
Why the first one fails!