im attempting to pass a 2 dimensional array of characters to a method. but keep ending up with a .class expected when compiled. there is a lot of extra code i excluded cause no error
2 errors found: File: /home/cmehmen/CSC 202/NewFolder/TicTacToe.java [line: 741] Error: '.class' expected File: /home/cmehmen/CSC 202/NewFolder/TicTacToe.java [line: 741] Error: ';' expected
char [][] matrix2 ={
{' ',' ',' '},
{' ',' ',' '},
{' ',' ',' '},
};
//end main
vicCheck (char[][]matrix2);
public static void vicCheck(){
if(matrix2 [0][0] == 'X' && matrix2 [0][1] =='X' && matrix2 [0][2] =='X'){
System.out.println("Player X Wins");
}
if(matrix2 [1][0] == 'X' && matrix2 [1][1] =='X' && matrix2 [1][2] =='X'){
System.out.println("Player X Wins");
}
if(matrix2 [2][0] == 'X' && matrix2 [2][1] =='X' && matrix2 [2][2] =='X'){
System.out.println("Player X Wins");
}
return;
}