Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need your help to program the following: Create a program Names with a two-dim

ID: 3618283 • Letter: I

Question

I need your help to program the following: Create a program Names with a two-dimensional array of 6names(first name and last name in each row). Walk through the arrayand output the first name and last name. Put one name on each line.Walk through the array a second time and output the last name inuppercase followed by a comma, a space, and then the first name inlowercase. Put one name on each line. Thanks I need your help to program the following: Create a program Names with a two-dimensional array of 6names(first name and last name in each row). Walk through the arrayand output the first name and last name. Put one name on each line.Walk through the array a second time and output the last name inuppercase followed by a comma, a space, and then the first name inlowercase. Put one name on each line. Thanks

Explanation / Answer

import java.util.*;

public class firstAndLastName {
  public static void main(String[] args){
    String arr[][] = new String[6][2];
    
    arr[0][0] = "John";
    arr[0][1] = "Smith";
    
    arr[1][0] = "Peter";
    arr[1][1] = "Nguyen";
    
    arr[2][0] = "Alexander";
    arr[2][1] = "Hamilton";
    
    arr[3][0] = "Hello";
    arr[3][1] = "World";
    
    arr[4][0] = "Conner";
    arr[4][1] = "Appleseed";
    
    arr[5][0] = "Nick";
    arr[5][1] = "Varejo";
    
    for(int i = 0; i < arr.length; i++){
      System.out.println(arr[i][0] + " " + arr[i][1]);
    }
    
    System.out.println(" Last Name Capital and first this time. Second time around.");
    
    for(int i = 0; i 
import java.util.*;

public class firstAndLastName {
  public static void main(String[] args){
    String arr[][] = new String[6][2];
    
    arr[0][0] = "John";
    arr[0][1] = "Smith";
    
    arr[1][0] = "Peter";
    arr[1][1] = "Nguyen";
    
    arr[2][0] = "Alexander";
    arr[2][1] = "Hamilton";
    
    arr[3][0] = "Hello";
    arr[3][1] = "World";
    
    arr[4][0] = "Conner";
    arr[4][1] = "Appleseed";
    
    arr[5][0] = "Nick";
    arr[5][1] = "Varejo";
    
    for(int i = 0; i < arr.length; i++){
      System.out.println(arr[i][0] + " " + arr[i][1]);
    }
    
    System.out.println(" Last Name Capital and first this time. Second time around.");
    
    for(int i = 0; i