|
|||||||
New to SitePoint Forums? Register here for free!
|
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 | |
|
SitePoint Evangelist
![]() ![]() ![]() ![]() Join Date: Mar 2006
Posts: 581
|
java.lang.ArrayIndexOutOfBoundsException problem
I am dotin this
Code:
String[] filesToZip ={ args[0]};
Quote:
|
|
|
|
|
|
|
#2 |
|
SitePoint Evangelist
![]() ![]() ![]() ![]() Join Date: Mar 2006
Posts: 581
|
I solve it!
|
|
|
|
|
|
#3 |
|
SitePoint Member
Join Date: Oct 2009
Posts: 14
|
This is for anyone else that might get this problem since OP didn;t state what they did to fix it.
Most of the time this error happens when you try to access a spot in the array that wasn't either initialzed or doesn't exist.. for instance. int [] numberArray = {1,2,3}; the size of the Array is 3... if you try this: numberArray[3] you will get the above error because you tried to access a spot that was not initialized since there size is 3 and not 4.. this would work: numberArray[2] which would have the value of 3 |
|
|
|
![]() |
| Bookmarks |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
|
All times are GMT -7. The time now is 11:43.








Linear Mode
