Try to Convert Vector to int
if(Foods.isEmpty()!=true)
{
int x = 0;
int z =0;
for(int j =0; j<Foods.size(); j++)
{
x++;
int[]i = (int [])(Energys.elementAt(j));
i[j] = z;
totalE[j] = z; // totalE[] is a int array.
System.out.println(z);
For the following code i got no compilation error but when run reaching the line. Errors java.lang.ClassCastException
at DW.commandAction(+1832)
at javax.microedition.lcdui.Display$DisplayAccessor.commandAction(+282)atjavax.microedition.lcdui.Display$DisplayManagerImpl.commandAction(+10)
at com.sun.midp.lcdui.DefaultEventHandler.commandEvent(+68)
atcom.sun.midp.lcdui.AutomatedEventHandler.commandEvent(+47)at com.sun.midp.lcdui.DefaultEventHandler$QueuedEventHandler.run(+250)
What can i do? Can anyone help thanks>

