Its probably a very simple one but its\' still confusing me!
import java.util.ArrayList; public class Sample { ArrayList i = new ArrayLis
You created a memory stage for j with ; j = new ArrayList<>(); but then you said that let j refer to i's memory stage. So after j=i; any changes on i or j are going to effect both of them. Because they reference to the same objects.