Composing string functions

Report a typo

Given the following three functions:


Function<String, String> operator1 = s -> s + s;
Function<String, String> operator2 = s -> String.valueOf(s.length());
Function<String, String> resultOperator = operator1.compose(operator2);

Enter the result of the following invocation (without quotes):

resultOperator.apply("test");
Enter a short text
___

Create a free account to access the full topic