Question: IN JAVA PLEASE! Write a method called listlength() that takes in a list of strings and returns a list of their lengths as integers. You
IN JAVA PLEASE!

Write a method called listlength() that takes in a list of strings and returns a list of their lengths as integers. You must create a new list for your answer. Hint: Please use java built-in ArrayList and List to complete the method. Examples: listLength(list("", "", "ab", "abc")) -> list(e, 1, 2, 3) listLength(list("hello world")) -> list(11) listLength(list()) -> list() Note: In the Java built-in List class, the following methods may be useful for you in the question: - Eget(int index): Returns the element at the specified position in this list. For example, in String Araaylist("", "a", "b", "abc" }, the return of its get(1) method would be "a" - void add(e e): Appends the specified element to the end of this list (optional operation). For example, ArrayList
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
