新人求教 为什么打印String char字符的时候出现了这种问题?
System.out.println("\100");
byte []b = {0100}; //八进制表示法
System.out.println(new String(b));
public class StringTest
{
public static void main(String[] args)
{
String str = "Helloc";
String s1 = str.replace('o', 'b');
String s2 = str.replace('c', '\16');
System.out.println(s1);
System.out.println(s2);
String s2 = str.replace('h', 'd');
System.out.println(s2);
}
}