Ok so im told there is a slight logical error with my for inner loop. apparently if my [2][2] array had was 2X3 elements or 3X2 elements it wouldnt work could someone tell me how to fix this slight problem?
public static void dispArr(String [][] country){
for(int i= 0; i<country.length; i++){ // both for loops count from 0 to 1 which are the only numbers required for this given array
for(int j= 0; j<country.length; j++){
System.out.print(country[i][j]); //this will output [0][0],[0][1],[1][0] and[1][1] as identified above.
}
System.out.println("\n"); //create space between both
}
}
country[i].lengthin the inner loop