posted 15 years ago
hi,
I am really confused with this question:
final List ar =new ArrayList();
ar.add("abc");
it will compile and execute with out giving error.
then why we need to put final here?
In case If I want to create readonly arraylist object what can i do ?
so that by using ar.add("abc"); will given an unmodifiable exception
Please help me out
thnaks
Sai
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4