Checking for a null value

I have created an array of strings but do no not initialise the values until required. How do i check to see if the array location contains a null value? I keep getting a null pointer exception when i check.
[214 byte] By [MichaelRFleeta] at [2007-9-28 5:40:59]
# 1

String[] stringArray = new String[10];

if( stringArray[1] == null )

{

// do something...

}

else

{

// do something else...

}

jonathanknighta at 2007-7-9 16:51:51 > top of Java-index,Archived Forums,New To Java Technology Archive...
# 2
A string array component should be initialized before it is used.String[] array;for(int i=0; i<arraylength; i++)if(array(i)!=null)// Initialize array component>
dvohra09a at 2007-7-9 16:51:51 > top of Java-index,Archived Forums,New To Java Technology Archive...