Java 面试
new Integer(1).equals(new Long(1)); //false
String s = "msg";
s.replace("s", "o");
System.out.println(s); //msg
if(true & true){
System.out.prinln("execute ok");
}else{
System.out.prinln("execute fail");
}
// ok
String s = "msg";
int i = s.indexOf("s", 1);
System.out.println(i); //1
String s1 = "msg";
String s2 = s1;
String s3 = "msg";
System.out.println(s1 == s2); //true
System.out.println(s1.equals(s2)); //true
System.out.println(s1 == s3); //true
System.out.println(s1.equals(s3)); //true