Results 1 to 3 of 3
- 01-22-2010, 07:28 AM #1
Member
- Join Date
- Jan 2010
- Location
- indonesia
- Posts
- 2
- Rep Power
- 0
- 01-22-2010, 07:35 AM #2
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,410
- Blog Entries
- 7
- Rep Power
- 17
Suppose you have an int array like this:
The valid index vanlues are 0, 1 and 2 because the array has three elements; now suppose you try to do this:Java Code:int[] a= new int[3];
Obviously this isn't a valid index value and that's why you receive that Exception. The Exception stack trace also showed the exact line number in your code where you tried to use such an out of bounds index value.Java Code:a[-11912555]= 42;
kind regards,
Jos
- 01-22-2010, 08:05 AM #3
Member
- Join Date
- Jan 2010
- Location
- indonesia
- Posts
- 2
- Rep Power
- 0
Similar Threads
-
java.lang.NoSuchMethodError: org.apache.log4j.Logger.log(Ljava/lang/String;Lorg/apach
By rameshraj in forum JDBCReplies: 5Last Post: 03-17-2011, 02:26 PM -
Java.lang.ExceptionOutOfMemory: Java heap space. lulzwut?!
By Addez in forum New To JavaReplies: 4Last Post: 11-03-2009, 04:01 PM -
java.lang.UnsatisfiedLinkError: no parport in java.library.path
By Heather in forum NetBeansReplies: 3Last Post: 09-07-2009, 01:28 PM -
JFileCjooser--java.lang.RuntimeException: java.io.IOException: Could not get shell fo
By Manfizy in forum New To JavaReplies: 4Last Post: 06-24-2009, 06:34 AM -
Error: cannot resolve symbol' on Person (java.lang.String, java.lang.String)
By baltimore in forum New To JavaReplies: 2Last Post: 09-18-2008, 07:30 AM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks