ClassCastException error problem
Hi all,
I am relatively new to java and confused with the following problem. The below code compilers but returns a ClassCastException error when run.
private List<TableOne> query =new ArrayList<TableOne>();
private TableTwo tableTwo;
//create an array of values
for (Double value : array){
query = ..result from sql query (needs to be list using hibernate)
}
for (TableOne queryValue : query ){
//something
}
public List<TableOne> getTableOne(){
return query;
}
public List getQuery()
{
return this.Query;
}
The ClassCastException error occurs on the second for loop? Is this because the wo objects are not of the same type? Any suggetions would be great, thanks in advance

