X649: Longest string

Given an array of Strings, return the longest String in the array. If the array is empty, return null.

Examples:

longest({"abc","ab","a"}) -> "abc"

Your Answer:

Reset

Practice a different Java exercise

Feedback

Your feedback will appear here when you check your answer.