Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 22nd Jan 2010, 06:38 AM   #1
Warrior Member
 
Join Date: 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default
What does this JAVA exception mean?
Share on: 
fb share twitter share gplus share more share

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 10
at Screen.draw(Screen.java:32)
at Menu.main(Menu.java:105)
I have no idea what it means.

chatab is offline  
Unread 22nd Jan 2010, 08:36 AM   #2
Affiliate SledgeHammer
War Room Member
 
David McKee's Avatar
 
Join Date: 2008
Location: Mint Hill, NC, USA.
Posts: 439
Thanks: 147
Thanked 82 Times in 58 Posts
Blog Entries: 5
Default
Re: What does this JAVA exception mean?
Share on: 
fb share twitter share gplus share more share

It means that the array used in your program was accessed at a location it does not have, for example, if the array was defined as being length 10, and you accessed the array at it's 11th location, then you would get that error because it does not have an 11th location:

String[] myArray = {"first", "second", "third"};
System.out.println(myArray[3]);

This would give you an error because the array is indexed starting at position '0'.

myArray[0] = "first";
myArray[1] = "second";
myArray[2] = "third";

I hope that helps.

-DTM

Are you an affiliate marketer? My site has tons of free stuff and 14,000 pages of Clickbank research. www.affiliatesledgehammer.com
Buy a Freedom Bulb! Don't let the government tell you what kind of light bulb you can use!
David McKee is offline  
Unread 22nd Jan 2010, 08:39 AM   #3
Warrior Member
 
Join Date: 2010
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default
Re: What does this JAVA exception mean?
Share on: 
fb share twitter share gplus share more share

oooh woow thanks for sharing .... let me check

chatab is offline  
Closed Thread


Bookmarks

Tags
exception, java


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 08:15 AM.