Why does this statement give me an error in the program mentioned below? for(int y=0, int z=0; z
The program I used it in is ::
class Testloops
{
public static void main(String[] args)
{
int[] x={ 7,6,5,2,8,9,3};
for(int y=0, int z=0; z<x.length;z++)
{
y= x[z];
System.out.println(y+ " ");
}
}
}