This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
    Bookmark Topic Watch Topic
  • New Topic

Find the error in this program!!!  RSS feed

 
shribalaji arumugham
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Report post to moderator


[edit]Add code tags. CR[/edit]
[ July 21, 2008: Message edited by: Campbell Ritchie ]
 
Mark Vedder
Ranch Hand
Posts: 624
IntelliJ IDE Java
  • Mark post as helpful
  • send pies
  • Report post to moderator
Here's a hint... where is the code putting anything into the array? The code creates an array, then tries to get things out of it and then act on those things (i.e. call its get() method).

Only arrays of primitives (i.e. ints, bytes, floats, etc) are initialized with default values. Arrays of objects are defaulted to null values.
[ July 21, 2008: Message edited by: Mark Vedder ]
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24217
38
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Report post to moderator
I already explained this to you here.
 
Campbell Ritchie
Marshal
Posts: 55707
163
  • Mark post as helpful
  • send pies
  • Report post to moderator
Originally posted by Ernest Friedman-Hill:
I already explained this to you here.
In which case I shall have to regard this thread as a duplicate. Please read this. I think I shall have to close this thread.
 
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!