ArrayList of ArrayLists (dynamic 2D array) of custom class

Variable1 = 5; Variable2 = 10;

Variable1 = Variable2;
//The value of Variable1 would now be 10

Variable2 = 20;
//Setting the new value of variable2 to 20

//Variable1 would still be 10 and not change as Variable2 gets changed