A good answer might be:

No. Sometimes strArray[j].length will ask for the length of a non-existant String.

Complete Runnable Example

class StringArray
{
  public static void main ( String[] args )
  {
    String[] strArray = new String[8] ;  

    strArray[0] = "Hello" ;
    strArray[1] = "World" ;
    strArray[2] = "Greetings" ;
    strArray[3] = "Jupiter" ;
    strArray[ strArray.length-1 ] = "the end" ;

    for (int j=0; j  < strArray.length; j++ )
      if ( strArray[j] != null )
        System.out.println( "Slot " + j + ": " + strArray[j] );
      else
        System.out.println( "Slot " + j + ": " + "empty" );
  }
}

You may wish to "copy-paste-save-and-run" this complete program, which contains the example fragment. If you don't, you risk becoming a second string programmer.

First-string programers that run this code will see:

Slot 0: Hello
Slot 1: World
Slot 2: Greetings
Slot 3: Jupiter
Slot 4: empty
Slot 5: empty
Slot 6: empty
Slot 7: the end

QUESTION 8:

What will the following statement do. Assume that it immediately follows the last line of the program:

    strArray[0] = "Good-by" ;
Click Here after you have answered the question