Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

public class Main {
    public static void main(String[] argv) {
        System.out.println(create().calculate(2, 2));
    }

    private static Calculator create() {
        return (x, y) -> x / y;
    }
}

@FunctionalInterface
interface Calculator {
    long calculate(long x, long y);
}