Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package functional.interfaces;
- @FunctionalInterface
- interface LambdaFinal{
- void printMessage(String msg);
- }
- public class LambdaTest06 {
- public static void main(String[] args) {
- String value1 = "hello";
- String value2 = "java";
- final String value3 = "world";
- LambdaFinal lambda01 = message -> System.out.println(message + ". " + value1 + " "+ value2 + " " + value3);
- // value2 = "java8";
- // burada value2 ' ye tekrar deger set etmek istersek,
- // compile error verir, value2 legal degildir.
- // effectively final degildir.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement