Skip to content

Instantly share code, notes, and snippets.

@pramodpk89

pramodpk89/BiconsumerEx.java Secret

Created Apr 24, 2020
Embed
What would you like to do?
Simple biconsumer implementation to take 2 input strings, and display them on console.
package com.ppkcodes;
import java.util.function.BiConsumer;
public class BiconsumerEx {
public static void main(String[] args) {
BiConsumer<String,String> displayName=(fName,lName)-> System.out.println(fName+" "+lName);
displayName.accept("Sachin","Tendulkar");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.