Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- boolean[][] dots = new boolean[5][5];
- Random randomBoolean = new Random();
- //Now i want to create a table with random boolean values
- //Eternal loop
- for (;;) {
- try {
- Thread.sleep(500);
- for (int i = 0; i < 5; i++)
- {
- for (int j = 0; j < 5; j++)
- {
- dots[i][j] = randomBoolean.nextBoolean();
- System.out.print(dots[i][j] + "t");
- }
- //Close the column
- System.out.println();
- }
- System.out.println();
- }
- catch (InterruptedException e)
- {
- }
- }
Add Comment
Please, Sign In to add comment