int testScores = new int;
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;
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.