Java array, NullPointerException?

You are declaring an array of 2 hands. This is just setting up the array. You then need to instantiate the hand objects inside the array.

Say

hand[0] = new Hand(); 
hand[1] = new Hand();

Leave a Comment