Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Exception  RSS feed

 
kirba devi
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
what is the difference between IndexOutOfBoundsException and ArrayIndexOutOfBoundsException

Regards
Kirba.
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ArrayIndexOutOfBoundsException is a sub-class of IndexOutOfBoundsException. It means what IndexOutOfBoundsException means, but is specific to arrays.

Check the API documentation for more details, and get used to checking it when you have questions like this.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!