Question: Code a method called getLongest that takes an array of Strings and returns the longest String in the array before done is encountered -You can
Code a method called getLongest that takes an array of Strings and returns the longest String in the array before done is encountered
-You can assume a non-null array will be passed and that done element always be present
-Return the empty String for an array whose first element is done
-If there are multiple Strings with the same longest length return the LAST in the index order
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
