java 22 3e 22

Solutions on MaxInterview for java 22 3e 22 by the best coders in the world

showing results for - "java 22 3e 22"
Yannic
18 Mar 2016
1interface LambdaFunction {
2    void call();
3}
4class FirstLambda {
5    public static void main(String []args) {
6        LambdaFunction lambdaFunction = () -> System.out.println("Hello world");
7        lambdaFunction.call();
8    }
9}
Isabelle
25 Nov 2017
1Runnable r = ()-> System.out.print("Run method");
2
3// is equivalent to
4
5Runnable r = new Runnable() {
6            @Override
7            public void run() {
8                System.out.print("Run method");
9            }
10        };