Hi,
I have a public method which takes
String as a parameter which actually represents a class name. My requiremnet is to cast the value i get from a collection object to the class name represented by the string parameter. For example
public String getValueObject(String className) {
java.util.ArrayList al = getData();
for(int i=0; i < al.size(); i++) {
className cn = (className) al.get(i);
//At this instance i am getting error
}
return null;
}
Appreciate if some could help me in correcting the code.
Regards.
Smitha