File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Arrays Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Arrays" Watch "Arrays" New topic
Author

Arrays

Shiva Mohan
Ranch Hand

Joined: Jan 05, 2006
Posts: 479
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
Originally posted by Shiva Mohan:


Because in the first line, you are declaring an array of ints.

You cannot store null in that array.

In the second line you are declaring an array of arrays.

Since arrays are objects, references to arrays are object references.

So it is legitimate to store null in that array.

In the third line, ia1[0] is null, so you can't try to access its elements.
[ April 24, 2007: Message edited by: Keith Lynn ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Arrays