Tutorial.java Source code

Java tutorial

Introduction

Here is the source code for Tutorial.java

Source

import java.util.EnumMap;

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);

        map2 = map1.clone();

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