posted 18 years ago
i am using Linkedlist in my program and i want to make it unmodifiable thru out my program so i am using this method
LinkedList<Object> l=new LinkedList<Objectl.add("a");
l.add("b");
l.add("c");
l.add("d");
List list=Collections.unmodifiableList(l);//here is an error
while i use arraylist,vector in place of linkedlist it is not showing any error
why?
linkedlist is also implementing the List interface as arraylist and vector does
:roll:
please somebody give me the best suggestion with example( iam learning OOPs through collection frame work)
A = HARDWORK B = LUCK/FATE If C=(A+B) then C=SUCCESSFUL IN LIFE else C=FAILURE IN LIFE
SCJP 1.4