Good day, colleagues. There is one code that outputs a table of random boolean values ββto the console. Everything would be fine, but I need the values ββnot to be output by the stream, one after the other, but changed in real time. Those by analogy with the clock in the console: the time should not be written in a new line with each new second, but should be, and updated in the original.
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) { } } What and where do I need to add for this? thank