Tutorial.java Source code

Java tutorial

Introduction

Here is the source code for Tutorial.java

Source

import java.util.*;

enum Tutorial {

    CSS, Python, PHP, Java, Javascript
};

public class Main {

    public static void main(String[] args) {
        EnumMap<Tutorial, String> map1 = new EnumMap<Tutorial, String>(Tutorial.class);
        EnumMap<Tutorial, String> map2 = new EnumMap<Tutorial, String>(Tutorial.class);

        map1.put(Tutorial.CSS, "1");
        map1.put(Tutorial.Python, "2");
        map1.put(Tutorial.PHP, "3");
        map1.put(Tutorial.Java, "4");

        System.out.println("Map1: " + map1);
        System.out.println("Map2: " + map2);

        map2.putAll(map1);

        System.out.println("Map1: " + map1);
        System.out.println("Map2: " + map2);
    }
}