Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

import com.google.common.collect.*;

import java.util.List;
import java.util.Map;

public class Main {
    private static void immutableUtil() {
        System.out.println("----------immutableUtil----------");
        Map<String, String> immutableMap = ImmutableMap.of("a", "A", "b", "B");
        System.out.println(immutableMap);
        List<String> immutableList = ImmutableList.of("a", "b", "c");
        System.out.println(immutableList);
        BiMap<String, Integer> biMap = ImmutableBiMap.of("a", 1, "b", 2);
        System.out.println(biMap.inverse());
        System.out.println(biMap);
    }
}