2d array.What is the difference between these two?

I have a simple class and create a 2d array to store objects in x,z coordonates:

var classArray : MyClass[,];
var classTest : MyClass

var x : int;
var z : int;

function Update()
{
classArray = new MyClass[4,4]

for(x=0 ; x<4 ; x++)
{
for(z=0 ; z<4 ; z++)
{
classArray[x,z] = classTest;

or                               ////what is the difference betwen these two

classTest = classArray[x,z];

}
}

}

I would like to know what is the difference betwen those two examples and what effects do they have. Are these both the same or are these any different.

I came across this in a tutorial and would like to know more about it before I continue instead of blindly copy/pasting everything.

In the first case the element of the classArray with indices x,z is given the value of the classTest, which is equal to null because it was never initialized, and in the end of the code execution the classArray will be filled with null elements.

In the second case the classTest variable will be continuously given the value of the element of the classArray with indices x,z, overriding its previous value, and in the end of the code execution the classTest variable will have the value of the last element of the classArray, i.e. a reference to the last MyClass instance of the array (classArray[3,3]).

If this wasn’t clear enough, I could try to explain it more.