My method maxLength() takes an ArrayList of Strings as a parameter and returns the length of the longest string in the list. If maxLength() is passed an empty list, it should return 0. In the main method, there are some test cases to display the functionality of maxLength().
mj422 / arrayliststringcomparator Goto Github PK
View Code? Open in Web Editor NEWMy method maxLength() takes an ArrayList of Strings as a parameter and returns the length of the longest string in the list. If maxLength() is passed an empty list, it should return 0. In the main method, there are some test cases to display the functionality of maxLength().