|
|
|
|
![]() ![]() |
May 27 2008, 10:49 AM
Post
#1
|
|
|
|||[ n00b King ]||| ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 685 Joined: 20-June 07 From: Auckland Member No.: 45,102 |
I'm having some issues with working with objects [][]. I get an index out of bounds ex.
Exception in thread "AWT-EventQueue-0" java.lang.ArrayIndexOutOfBoundsException: 0 heres how I'm using it ---------------------------- Object[][] contestants = new Object[][] {}; contestants[0][0] = "test"; any ideas appreciated. Do I need to specify the initial size on creation or something? It seems I answered my own question I gave it an inital size then I was able to add things. But is there a way I can add to it on the fly without knowing its require maximum size? This post has been edited by sonesay: May 27 2008, 10:58 AM |
|
|
|
Jul 8 2008, 01:06 AM
Post
#2
|
|
|
Newbie [Level 1] ![]() Group: Members Posts: 10 Joined: 7-July 08 Member No.: 64,709 |
I think what your trying to do is to big to handle or somewhere in your coding process you must of forgot something and it compiled
|
|
|
|
Jul 8 2008, 02:16 AM
Post
#3
|
|
|
|||[ n00b King ]||| ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 685 Joined: 20-June 07 From: Auckland Member No.: 45,102 |
I found the error a little after I made the initial post. It was because I did not give the array an initial max size so it wouldn't let me use it. Thanks for your input none the less.
|
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 11th October 2008 - 02:55 AM |