Here you can find the source of map(String... args)
static Map<String, String> map(String... args)
//package com.java2s; import java.util.Collections; import java.util.HashMap; import java.util.Map; public class Main { static Map<String, String> map(String... args) { if (args == null || args.length == 0) { return Collections.emptyMap(); }/*from w w w . j a va 2 s .c o m*/ Map<String, String> map = new HashMap<String, String>(); for (int i = 0; i < args.length;) { map.put(args[i++], args[i++]); } return map; } }