C
crazzybugger
ArrayList list=new ArrayList();
list.add("Testing........");
list.add("Jackie chan");
Object []temp1=list.toArray();
String [] temp2=(String [])temp1;
this piece of code throws Cast exception................ Since all the
list members are of type String why should it throw Cast Exception
unless it finds any of the members not to be a String ???
list.add("Testing........");
list.add("Jackie chan");
Object []temp1=list.toArray();
String [] temp2=(String [])temp1;
this piece of code throws Cast exception................ Since all the
list members are of type String why should it throw Cast Exception
unless it finds any of the members not to be a String ???