Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Beginning Java
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Beginning Java
ArrayIndexOutofBounds
Jherald Lacambra
Ranch Hand
Posts: 129
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
a little confusion:
what does it tell if java.lang.ArrayIndexOutOfBoundsException: -1
or java.lang.ArrayIndexOutOfBoundsException: 0?
jherald
Ernest Friedman-Hill
author and iconoclast
Posts: 24207
46
I like...
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
The number is the index you tried to use. -1 is always a bad index, so that's obvious. 0 is only a bad index if you've got a zero-length array.
[Jess in Action]
[AskingGoodQuestions]
Jherald Lacambra
Ranch Hand
Posts: 129
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
does it mean that i have an index of -1?
jherald
Jherald Lacambra
Ranch Hand
Posts: 129
posted 18 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
i saw the error.. thnx for you fast response
jherald
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
?
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Dan's question
Understanding this Array?
Out of bounds error
Not able to do java ranch's SCWCD mock exam
java.lang.ArrayIndexOutOfBoundsException: 1 >= 0
More...