When I run a program in eclipse I get ClassCastException but when i run it in cmd it does not crash. what is wrong in eclipse? It is the return statement i get the error.
private static <T> T[] tilArray(Tabell<T> tabellen)
{
T[] ut = (T[])new Object[tabellen.storrelse()];
int pos = 0;
for(T element : tabellen)
{
ut[pos++] = element;
}
return ut;
}