Here you can find the source of toMap(Object[][] array)
public static Map toMap(Object[][] array)
//package com.java2s; //License from project: Apache License import java.util.HashMap; import java.util.Map; public class Main { public static Map toMap(Object[][] array) { Map m = new HashMap(); for (Object[] pair : array) { m.put(pair[0], pair[1]);/*from w ww . j a va 2 s.c om*/ } return m; } }