Guest User

Untitled

a guest
Oct 21st, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. boolean[][] dots = new boolean[5][5];
  2.  
  3. Random randomBoolean = new Random();
  4.  
  5. //Now i want to create a table with random boolean values
  6. //Eternal loop
  7. for (;;) {
  8. try {
  9. Thread.sleep(500);
  10. for (int i = 0; i < 5; i++)
  11. {
  12.  
  13. for (int j = 0; j < 5; j++)
  14. {
  15. dots[i][j] = randomBoolean.nextBoolean();
  16. System.out.print(dots[i][j] + "t");
  17. }
  18. //Close the column
  19. System.out.println();
  20. }
  21. System.out.println();
  22. }
  23. catch (InterruptedException e)
  24. {
  25. }
  26.  
  27. }
Add Comment
Please, Sign In to add comment