Write a program that declares and initializes a 2D int array with 4 rows and 2 columns. Then, fill all of the array entries with the value 3. Try to find multiple ways to do this!
class Main { public static void main(String[] args) { int [][] array = new int [4][2]; for (int b = 0; b<2; b++){ for (int a = 0; a < 4; a++){ array [a][b] = 3; } } } } class Main { public static void main(String[] args) { int [][] array = new int [4][2]; array [1][1] = 3; array [2][1] = 3; array [3][1] = 3; array [4][1] = 3; array [1][2] = 3; array [2][2] = 3; array [3][2] = 3; array [4][2] = 3; } }