Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.HashMap;
import java.util.Map;

public class Main {
    public static void main(String[] argv) throws Exception {

        Map<Integer, String> map = new HashMap<Integer, String>();

        map.put(1, "first");
        map.put(2, "second");
        // map.put(1, 2); <- Syntax error
    }
}