Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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

public class Main {

    public static void main(String[] args) {
        Map<String, Integer> map = new HashMap<String, Integer>();
        // add some values in the map
        map.put("One", 1);
        map.put("Two", 2);
        map.put("Three", 3);

        LinkedHashMap<String, Integer> linkMap = new LinkedHashMap<String, Integer>(map);

        System.out.println(linkMap);

    }
}