public static void main(String[] args) { Function1<String, Integer> lengthOfString = string -> string.length(); lengthOfString.apply("Master"); }