Hal Videira wrote:On line 2, my understanding is that a new array with space for 3 Dog reference variables is created. Then the array is assigned to the variable myDog which is of type Dog. Is this correct?
Welcome to JavaRanch!
You are almost correct:
"a new array with space for 3 Dog reference variables is created"
"Then the array is assigned to the variable myDog"
"myDog ... is of type Dog."
Incorrect. The type of myDog is Dog Array, or Dog. If it were of type Dog, for instance, you would be able to do this:
Since both yourDog and myDog would be the same type. But that would fail.
myDog is of type Dog Array, which holds references of type Dog.