Java代码查错,请高手支招
bill1 2015-06-29 10:07:35 package est;
public class Test {
public static void main(String[] args) {
// TODO Auto-generated method stub
String s= "12341234\0ddd12348979xasfasdf";
int y =s.length();
int x= s.indexOf("\n");
String s1= s.replaceAll("\n", "").replaceAll(" ", "");
String s2=s.replaceAll("\0", "");
String s3=s.replaceAll("\\0", "");
System.out.println(s1);
System.out.println(s2);
System.out.println(s3);
}
}