For example, I have a class, let's say,
public class Foo {
private List<Object> dummyList;
public void getDummyList() {
return this dummyList;
}
}
I have a statement like below,
List<Object> realList = Foo.getDummyList();
Now, if I add item into realList, Foo's dummyList will also have this item. Is this called object reference? If not, what is the reason beside Java? It will be great if you can provide some tutorial?