11 lines
208 B
Java
11 lines
208 B
Java
|
import java.util.function.Function;
|
||
|
public class Lam1{
|
||
|
public Lam1() {
|
||
|
Function<String,String> fun = (x) -> x+"1";
|
||
|
fun.apply("2");
|
||
|
|
||
|
Runnable lam = () -> System.out.println("lambda");
|
||
|
lam.run();
|
||
|
}
|
||
|
}
|