Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

import java.util.Collections;
import java.util.TreeMap;

public class Main {

    public static void main(String[] args) {
        TreeMap<Integer, String> db = new TreeMap<Integer, String>(Collections.reverseOrder());
        db.put(1000, "1000");
        db.put(1011, "1011");
        db.put(1102, "1102");
        db.put(2023, "2023");
        db.put(2034, "2034");

        System.out.println(db);
    }
}