Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Array.length

 
Weerawit Maneepongsawat
Ranch Hand
Posts: 203
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

why it throw ArrayIndexOutOfBoundsException
??? i think arr[1][2].length = 0 ??
 
Barry Gaunt
Ranch Hand
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. a[1] is { { "1", "2" }, { "1", null, "3" } }
a[1][0] is { "1", "2" }, and a[1][1] is { "1", null, "3" }, and a[1][2] is ???
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic