Question: Consider the following two-dimensional array: String [ ][ ] states = { { CA, CO }, { MD, IL, ME, MI }, { NY, NJ,

Consider the following two-dimensional array:

String [ ][ ] states = { { "CA", "CO" },

{ "MD", "IL", "ME", "MI" }, { "NY", "NJ", "NE" } };

What is the value of states[2][1] ?

Retrieve ME from the array states and assign it to a String variable of your choice

Using a loop, output all the states that start with the letter M in the second row (as in this example); assume that you do not know how many columns are in the second row, i.e. DO NOT hard code 4; assume that you do not know that the 3 states are MD, ME, MI

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!