Here you can find the source of fieldToString(String name, Object value)
public static String fieldToString(String name, Object value)
//package com.java2s; public class Main { /**/*from w w w . j av a 2 s . c o m*/ * Returns a string that allows a field value pair to be added to a debug * string. */ public static String fieldToString(String name, Object value) { return fieldToString(name, value, false); } /** * Returns a string that allows a field value pair to be added to a debug * string. */ public static String fieldToString(String name, Object value, boolean firstParameter) { if (value == null) { return ""; } if (firstParameter) { return String.format("%s=%s", name, value); } return String.format(", %s=%s", name, value); } }