Let's create the ExecutorService with a single thread and execute a set of Callable tasks with String objects in it. You have to run them all with the invokeAll method. Output the longest String object you get. If there are several words of equal length, choose the one that comes first in alphabetical order. Don't forget to stop the service.
Sample input 1:
4
Java
Computer
Data
COBOL
Sample output 1:
Computer
Sample input 2:
3
euphoria
assembly
go
Sample output 2:
assembly