Question: String [ ] [ ] friends = { { Jamal , Suzy } , { Xander , Sloan } , {

String[][] friends ={{"Jamal", "Suzy"},{"Xander", "Sloan"},{"Thomas", "Aaron"}};
String name = friends[2][1];
System.out.println(name +" is at location, [2,1]");
Aaron is at location, [2,1]
Thomas is at location, [2,1]
Sloan is at location, [2,1]
Xander is at location, [2,1]
An ArrayIndexOutOfBoundsException occurs

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 Programming Questions!