0

For example:

ArrayList<SomeObj> list = new ArrayList<SomeObj>();
SomeObj temp = list.get(0); // this points to the first object and 
//any modification to it will be reflected in the ArrayList as well.(I think)

My question is there a way of making a 'new' object that has the same value as the one in the ArrayList but not modified if I change the 'temp' one. Note: I can only use ArrayLists.

yoddle
  • 1

0 Answers0