Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import java.util.HashMap;
import java.util.Map;

public class Main {
    public static Map stringToMap(String msg) {
        String[] parameters = msg.split(",");
        Map<String, String> parameterMap = new HashMap<>();
        for (String parameter : parameters) {
            String[] para = parameter.split("=");
            parameterMap.put(para[0], para[1]);
        }
        return parameterMap;
    }
}