Here you can find the source of simpleFormat(String s, Object aobj[])
public static String simpleFormat(String s, Object aobj[])
//package com.java2s; public class Main { public static String simpleFormat(String s, Object aobj[]) { String as[] = s.split("%s"); String s1;/*w w w. j av a 2 s .c om*/ if (as.length < 2) { s1 = s; } else { StringBuilder stringbuilder = new StringBuilder(); int i = aobj.length; int j = 0; do { int k = as.length; if (j >= k) break; String s2 = as[j]; StringBuilder stringbuilder1 = stringbuilder.append(s2); if (j < i) { Object obj = aobj[j]; StringBuilder stringbuilder2 = stringbuilder .append(obj); } j++; } while (true); s1 = stringbuilder.toString(); } return s1; } }