Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.function.Supplier;

public class Main {
    public static void main(String[] args) {
        System.out.println(maker(Employee::new));
    }

    private static Employee maker(Supplier<Employee> fx) {
        return fx.get();
    }
}

class Employee {
    @Override
    public String toString() {
        return "A EMPLOYEE";
    }
}