Can someone guide me how to convert ArrayList<String> to ArrayList<Object> ??
Object is a class written by me with some getters and setters..
List<Object> lstObj = new ArrayList<Object>();
for(String str: strList){
if(str==null)
lstObj.add(null);
}else{
lstObj.add((Object)(str));
}
}
java.lang.ObjectArrayList<Object> is mentioned explicitly in the OP.Object is really a custom class or a "placeholder" name for any other class.
Object, even though it is legal Java code.