Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

import java.util.Map.Entry;
import java.util.TreeMap;

public class Main {

    private static void MyPut(TreeMap<String, String> map, String key, String value) {
        for (Entry<String, String> entry : map.entrySet()) {
            String keyOld = entry.getKey();
            String valueOld = entry.getValue();
            if (keyOld.equals(key)) {
                value = valueOld + "&" + value;
                break;
            }
        }
        map.put(key, value);
    }
}