Array Assignments
Explore how assignments affect arrays in Java by understanding that assigning one array variable to another creates an alias, not a copy. Learn the difference between primitive type assignment and reference assignment and gain clarity on how arrays behave in memory.
We'll cover the following...
We'll cover the following...
We begin this lesson by reviewing what we know about assigning one variable to another one.
Variables of a primitive type
As we learned earlier in this course, when we assign a variable of a primitive type to another variable of the same type, the value in one variable replaces the value in the other. ...