Skip to content

Instantly share code, notes, and snippets.

@pramodpk89
Created April 24, 2020 11:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pramodpk89/40c1f3e7d1d66796d3f782daec03a263 to your computer and use it in GitHub Desktop.
Save pramodpk89/40c1f3e7d1d66796d3f782daec03a263 to your computer and use it in GitHub Desktop.
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