Question: This is for Java Lab 8.1.5 - String 2D Array Initially Empty Write a program to define an initially empty 2D array of String values,
This is for Java

Lab 8.1.5 - String 2D Array Initially Empty Write a program to define an initially empty 2D array of String values, with 4 elements in each of 3 rows, outputting the elements of the empty array, all null values, and then changing half the values to be foods you like, and the other half foods you don't like, and finally outputting them again. Include a blank line between output sets. public class Lab815 { public static void main(String [] args) // code to define an initially empty String 2D array String [] [] foods = new String [?] [?]; //code to output all original values System.out.println(foods [0][0]); System.out.println(foods[0][1]); //code to change half the values to foods you like //and the other half to foods you don't like //foods I like foods [0][0] = ""; //foods I don't like foods [1] [2] = ""; //code to output a blank line separating output sets System.out.println(); //code to output all array elements }
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
