Here you can find the source of arrayToString(Object[] objs)
Parameter | Description |
---|---|
objs | a parameter |
public static String arrayToString(Object[] objs)
//package com.java2s; //License from project: Apache License public class Main { /**//w w w .j ava2 s .c o m * Returns a String containing all the objects * * @param objs * @return the String containing all the objects */ public static String arrayToString(Object[] objs) { return arrayToString(objs, ""); } /** * Returns a String containing all the objects * * @param objs * an array of Object objects * @param delimiter * the delimiter between object's Strings * @return the String containing all the objects */ public static String arrayToString(Object[] objs, String delimiter) { StringBuffer sb = new StringBuffer(""); for (int i = 0; i < objs.length; i++) { sb.append(" #" + i + ": " + objs[i] + delimiter); } return sb.toString(); } }