Here you can find the source of toStringLong(HashMap
public static String toStringLong(HashMap<Long, Long> map)
//package com.java2s; //License from project: Open Source License import java.util.HashMap; import java.util.Map; public class Main { public static String toStringLong(HashMap<Long, Long> map) { String display = "["; for (Map.Entry<Long, Long> entry : map.entrySet()) { display += entry.getKey() + " : " + entry.getValue() + ", "; }/*w w w . j ava2s . com*/ display = display.substring(0, display.length() - 2) + "]"; return display; } }