Условие по задаче: нужно заполнить массив, чтоб в каждой строке было по 10 единиц (остальные нули). У меня получилось, что все единицы, так ещё и массив зубчатый. Ломаю голову. Помогите. import java.util.Arrays; public class Main { public static String robotank = "☖"; public static String empty = "-"; public static String hit = "🎯"; public static int height = 10; public static int width = 20; public static String[][] field = new String[height][width]; public static int[][] bombs = new int[height][width]; public static void main(String[] args) { for (int i = 0; i < bombs.length; i++) { Arrays.fill(bombs[i],0); int bombCount = 10; while (bombCount > 0) { int j = (int) (Math.random() *bombs[i].length); if (bombs[i][j] == 0) { bombs[i][j] = 1; bombCount--; } System.out.print (bombs[i][j]); } System.out.println(); } } } Заранее благодарна за помощь.