View Single Post
Old 07-08-2012, 06:50 PM   PM User | #12
Fou-Lu
God Emperor


 
Fou-Lu's Avatar
 
Join Date: Sep 2002
Location: Saskatoon, Saskatchewan
Posts: 15,752
Thanks: 4
Thanked 2,468 Times in 2,437 Posts
Fou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to allFou-Lu is a name known to all
And the code you are using is?
IndexOutOfBoundsException indicates you are trying to access an array outside of the valid range declared. That hasn't a thing to do with casting, for which it tosses a NumberFormatException. The scanner can also throw, but you'll likely only see the IllegalStateException off of it, and the NoSuchElementException is also possible if you try and force information out of it (from say a file).
Fou-Lu is offline   Reply With Quote