Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.HashMap;
import java.util.concurrent.Callable;

public class Main {

    public static void main(String[] args) throws Exception {

        HashMap<Integer, Callable<String>> m = new HashMap<Integer, Callable<String>>() {
            {
                put(0, () -> {
                    return "n";
                });
                put(1, () -> {
                    return "m";
                });
            }
        };
        System.out.println(m.get(0).call());
    }

}