I have String array which has 3 columns (id, name, city), I want to sort the array in ascending order with respect to name column. Please help me with this.
String[][] array1 = {{"54","jim","delhi"},
{"67","dwight","bangalore"},
{"39","pam","pune"}};
Expected output should be:
array1 = {{"67","dwight","bangalore"},
{"54","jim","delhi"},
{"39","pam","pune"}};