Hi im trying to make a 10X10 board using arrays and have to fill up 2/3 of the board with the letter b, and 1/3 with the letter x. Right now i have created the board and my output shows up as zeros for some reason. can somebody please help? my code is as follows:
import java.util.Random;
public class Board
{
int[][] board = new int[10][10];
public Board(int[][] x)
{
x = board;
generator = new Random();
}
public int getBoard()
{
return x;
}
private Random generator;
private int x;
}
public class testBoard
{
public static void main(String[] args)
{
Board b = new Board(null);
final int Tries = 10;
for (int i = 1; i<= Tries; i++)
{
int n = b.getBoard();
System.out.println(n + " ");
}
System.out.println();
}
}
and my output looks like this:
0
0
0
0
0
0
0
0
0
0
please help, im really confused. thanks :)