Hi all,
If references are marked final,
final Object o1 = new Object();
Object o2 = new Object();
we cant do this,
o1 = o2; //This is wrong.
but surely we can change the state of o1 (i.e change the value of instance variables for o1).
Now suppose i want to restrict even changing the state of the object o1.
How can we achieve this..??
Any help is appreciated.