Link to home
Start Free TrialLog in
Avatar of Xavior2K3
Xavior2K3

asked on

Array Maximum Bounds - OutOfMemoryError

Hi,

I'm trying to create an array with the following:

      int[][] imgArray = new int[3200][4800];

But i get an error:

      Exception in thread "main" java.lang.OutOfMemoryError: Java heap space

Why is this and is there any way around it? Are there maximum array bounds?

Thanks,
Michael
ASKER CERTIFIED SOLUTION
Avatar of hoomanv
hoomanv
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Since 3200 * 4800 * 4 (int size) = 58.6 MB
Avatar of Xavior2K3
Xavior2K3

ASKER

Great, thanks =)