Java examples for Lambda Stream:BiFunction
Use BiFunction Lambda
import java.util.function.BiFunction; public class FuncationMain { public static void main(String[] args) { doOperation((s, s1) -> (s + s1).length(), "Helllo", "Aman"); }/*from w ww . ja v a 2 s .c o m*/ public static void doOperation(BiFunction<String, String, Integer> function, String str, String str1) { int value = function.apply(str, str1); System.out.println("Output::>" + value); } }