X239: listLength

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.


listLength(list("", "a", "ab", "abc")) -> list(0, 1, 2, 3)
listLength(list("hello world")) -> list(11)
listLength(list()) -> list()

Your Answer:


Practice a different Java exercise


Your feedback will appear here when you check your answer.