SCJP,麻煩幫解釋一下,最後一段

You can also declare and construct an array in one statement as follows: int[] testScores = new int[14]; This single statement produces the same result as the two previous statements. Arrays of object types can be constructed in the same way: Thread[] threads = new Thread[5]; The key point to remember here... show more You can also declare and construct an array in one statement as follows:

int[] testScores = new int[14];

This single statement produces the same result as the two previous statements.
Arrays of object types can be constructed in the same way:

Thread[] threads = new Thread[5];

The key point to remember here is that—despite how the code appears—the
Thread constructor is not being invoked. We’re not creating a Thread instance, but
rather a single Thread array object. After the preceding statements, there are still
no actual Thread objects!

Think carefully about how many objects are on the heap after a code statement
or block executes. The exam will expect you to know, for example, that the
preceding code produces just one object (the array assigned to the reference
variable named threads). The single object referenced by threads holds five
Thread reference variables, but no Thread objects have been created or assigned
to those references.
1 answer 1