aspose file tools*
The moose likes Beginning Java and the fly likes Find the error in this program!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Find the error in this program!!!

shribalaji arumugham
Greenhorn

Joined: Jul 20, 2008
Posts: 3


[edit]Add code tags. CR[/edit]
[ July 21, 2008: Message edited by: Campbell Ritchie ]
Mark Vedder
Ranch Hand

Joined: Dec 17, 2003
Posts: 624

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
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

I already explained this to you here.


[Jess in Action][AskingGoodQuestions]
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 40061
    
  28
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.
 
 
subject: Find the error in this program!!!