i tried to typecast a list data to string but its showing error as java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List please help me to solve this issue.this is done using hibernate.
for(int i2=1; i2<=gantttablecolnameList.size(); ++i2)
{
columnname= (String) ((List)gantttablecolnameList.get(i1)).get(0);
}
this list contains tables column name.
true. What are you trying to achieve ?gantttablecolnameListdeclared? And are you sure your loop starts at 1? (List indexes count from 0)