Created
November 28, 2018 11:43
-
-
Save kasundharmadasa/ea5c836e6e455c92bea6b15bb68ff4e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.function.Consumer; | |
public class Main { | |
public static void main(String[] args) { | |
Consumer<String> lambda = s1 -> System.out.println("Hi " + s1); | |
lambda.accept("Alice"); //Output : "Hi Alice" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment