Here you can find the source of createMapFor(String... args)
public static Map<String, String> createMapFor(String... args)
//package com.java2s; import java.util.HashMap; import java.util.Map; public class Main { public static Map<String, String> createMapFor(String... args) { if (args.length % 2 > 0) throw new IllegalArgumentException( "The argument count must be event to account for key/value pairs. You provided " + args.length + " arguments."); Map<String, String> argMap = new HashMap<String, String>(); for (int i = 0; i < args.length; i = i + 2) { argMap.put(args[i], args[i + 1]); }/*from www . j a va2s . c om*/ return argMap; } }