Here you can find the source of replace(String source, CharSequence target, CharSequence replacement)
public static final String replace(String source, CharSequence target, CharSequence replacement)
//package com.java2s; public class Main { public static final String replace(String source, CharSequence target, CharSequence replacement) { if (source != null) { return source.replace(target, replacement); }/*from ww w . j a va2 s. c o m*/ return null; } }