That depends on where you allocate the array (persistent memory, transient memory) and on the available memory on your specific card. The technical limit for an array's size in Java Card is 32767 elements, because array indices are of type short
and can only be non-negative values.
You can get an approximation of the available memory available on your card through the method JCSystem.getAvailableMemory(...)
.
Note that it is possible to set a maximum volatile/non-volatile memory size limit during applet installation. So you may be running into a limit that has been set during installation of this specific application. For instance, with gpshell, the parameters of the install command to set memory limits are
-nvCodeLimit ...
for the maximul non-volatile code memory-nvDataLimit ...
for the maximul non-volatile data memory-vDataLimit ...
for the maximul volatile data memory