Hi Hai,
When you create a primitive array and specify the length, you are basically saying this array has X amount of values.
Example:
you are expressing the the array named card has 13 values.
The first value of an array is always at index 0
Example:
The last value of an array is always at index (length - 1)
Example:
In your case you need to increase your card size to 15, since your adding to the 14th index.
Example:
The same goes for your suits, even though your only adding four values to that array, your starting at the second index suits[1] and ending at an unallocated index of suits[4], you would have to increase your suit size to 5.
your application is most likely throwing an java.lang.ArrayIndexOutOfBoundsException
See
http://download.oracle.com/javase/1.4.2/docs/api/java/lang/ArrayIndexOutOfBoundsException.html
Have a look at this tutorial
java arrays, this explains it in more detail.
http://download.oracle.com/javase/tutorial/java/nutsandbolts/arrays.html
Also note each time the method is executed that array is created.
If your using java 1.5 or greater you could read up on java enumeration.
http://download.oracle.com/javase/tutorial/java/javaOO/enum.html