Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.HashMap;

public class Main {
    public static void main(String args[]) {
        HashMap<Integer, Integer> map = new HashMap<Integer, Integer>();

        map.put(1, 2);
        map.put(2, 3);
        map.put(3, 4);

        for (Integer key : map.keySet()) {
            System.out.println(map.get(key));
        }
    }
}