Nested variable
in
Programming Questions
•
1 year ago
I need nest a variable inside another variable, and be able to access the nested variable through the top layer one. Here is an example of what I want to accomplish:
- String bottom = "apple";
- String top = bottom;
- top = pear;
- println(bottom); //I want this to equal "pear"
Is there any way to do this?
1