hey...
im was writing the code for the game of life..u prob have herd about that ..im almost done...i just need add the code which determines which gameboard the user wants to use...here i got stuck lol..at the very end...
im gettin .class expected error
here is the sample code with the identical error......
public class test
{
public static void main(String[] args)
{
int sel = 2;
int array[][] = null;
if(sel == 2)
int array[][] = {{2,2},
{2,2}};
else
int array[][] = {{0,0},
{0,0}};
for(int i = 0; i < array.length; i++)
{
System.out.println();
for(int j = 0; j < array[0].length; j++)
{
System.out.print(array[i][j] + " ");
}
}
}
}
all i found on the net was that this error is commonly caused by extra, or missing bracket...please help!!
thanx