I have one array of [3][3] ID, Name, City if I've to take user input (ie Name) and then display the other details of person like id and city
public class Source {
String customerDetails[][]=new String[5][3];
Source() {
customerDetails[0][0]="1001";
customerDetails[0][1]="Nick";
customerDetails[0][2]="Chicago";
customerDetails[1][0]="1008";
customerDetails[1][1]="James";
customerDetails[1][0]="San Diego";
customerDetails[2][0]="1002";
customerDetails[2][1]="Tony";
customerDetails[2][2]="New York";
customerDetails[3][0]="1204";
customerDetails[3][1]="Tom";
customerDetails[3][2]="Houston";
customerDetails[4][0]="1005";
customerDetails[4][1]="Milly";
customerDetails[4][2]="San Francisco";
}
}
Please advise me. I'm new to java, Thanks!
forloop?CustomerDetailsclass and use anArrayList<CustomerDetails>