Java examples for java.util:Map Operation
print Map to a String via StringBuilder
//package com.java2s; import java.util.Arrays; import java.util.Map; public class Main { public static String printStrsMap(Map<String, String[]> map) { StringBuilder stringBuilder = new StringBuilder(); for (Map.Entry<String, String[]> entry : map.entrySet()) { stringBuilder.append(entry.getKey()).append("=") .append(Arrays.toString(entry.getValue())) .append("\r\n"); }//from ww w . j a va 2s . c om return stringBuilder.toString(); } }