I am trying to get a program to pick an element at random from an array, but I cant initialize the array. every time I run it it points at all of the elements says it doesn't recognize them.
public CountLetters(int rows, int cols, String[] vals)
{
char matrix[][] = new char[rows][cols];
char[] source = {a,b,c,d,e,f,g};
for(int i = 0; i < cols; i++){
for(int j = 0; j < row; j++){
matrix[i][j] = math.random(source);
}
}
}