Java examples for Language Basics:String
String replace by unicode
public class Main { private String jaText = "this is a test "; public Main() { String replaced = jaText.replaceFirst("\u6587\u5B57", "mojibake"); System.out.printf("Replaced: %s\n", replaced); }//from w w w. jav a 2 s. c o m }