Here you can find the source of createMap(Object[] keysValues)
public static Map createMap(Object[] keysValues)
//package com.java2s; //License from project: Open Source License import java.util.*; public class Main { public static Map createMap(Object[] keysValues) { Map ret = new HashMap(); for (int i = 0; i < keysValues.length; i = i + 2) { ret.put(keysValues[i], keysValues[i + 1]); }/* w w w .j a v a2s. co m*/ return ret; } }