Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.LinkedHashMap;

public class Main {

    public static void main(String[] args) {

        LinkedHashMap<String, Integer> map = new LinkedHashMap<String, Integer>(5, 0.75F, true);

        // add some values in the map
        map.put("One", 1);
        map.put("Two", 2);
        map.put("Three", 3);

        System.out.println(map);

        // clear the map
        map.clear();

        System.out.println(map);
    }
}