Here you can find the source of replace(String target, String replacement, String... args)
public static String[] replace(String target, String replacement, String... args)
//package com.java2s; // it under the terms of the GNU General Public License as published by import java.util.ArrayList; public class Main { public static String[] replace(String target, String replacement, String... args) { ArrayList<String> ret = new ArrayList<String>(); for (String s : args) ret.add(s.replace(target, replacement)); return ret.toArray(new String[] {}); }/*from w w w .j ava 2s.c om*/ }