I need help with step 1
Extracted text: 1. Complete the private int[U] copy0fBoard (int[][] originalBoard) method. In this method, you need to declare a 2D array with the same length of the parameter array originalBoard. Then your code must copy values in the parameter array originalBoard to the array you just created and then return it. 2. Complete the private int[] getTwORanNum(int min, int range) method. In this method, you should generate two random numbers in the range min ~ (min + range) and put them into a single dimensional array. Then your code must return this array. For example, if the passed value of min is 5, the passed value of range is 10, then your code need to generate two random numbers in the range 5 ~ 14.
Extracted text: 2 HW.ja import java.util.Arrays; import java.util.Random; PAPE public class Sudoku { public static final int[J BOARD = { (4, 3, 5, 8, 7, 6, 1, 2, 9}, {8, 7, 6, 2, 1, 9, 3, 4, 5}, {2, 1, 9, 4, 3, 5, 7, 8, 6}, (5, 2, 3, 6, 4, 7, 8, 9, 1}, {9, 8, 1, 5, 2, 3, 4, 6, 7}, {6, 4, 7, 9, 8, 1, 2, 5, 3}, {7, 5, 4, 1, 6, 8, 9, 3, 2}, {3, 9, 2, 7, 5, 4, 6, 1, 8}, {1, 6, 8, 3, 9, 2, 5, 7, 4}}; 22 23 24 25 26 27 public static final int GRID_SIZE = 9; public static final int SUBGRID_SIZE - 3; public static final double EMPTYCELL PERCENTAGE = 0.5; public static final 5tring VALUE= "123456789": 28 29 30 31 private int[) puzzle; private Random random - new Random(); 32 33 34 35 V/ Create a copy of Lhe sudoku board private int[) copyofBoard(int[][] originalBoard) { // step 1 V/ copy a the passed 20 array to a new array and then return it 36 37 38 39 40 41 42 /7 provide twd rändom number as an array With length tw. / used to hide ome numbers private int[) getTwokan Num (int min, Int range) 43 449 / strp 2 77 generate tuo runcom integers in the range min-mintrange saveLrmina LD array and return it 45 46 47 48 49 / Hide nome numbers to create puzzle. public int[l createNewPuzzle(int]U board) { this puzzle = cupyofBoard(board); int numofEmptylell = (int) Nath.floor(EMPTYCELL_PERCENTAGE * GRID_STZE * GRID S: 50 51- 52 53 54 |Writable P Type here to search esc %23 3. W tab ps lock