摘要: String s1 = "abcd"; String s2 = new String("ab cd"); //System.out.println(s1 == s2); 返回索引为1的值,空格也算 char c=s1.charAt(1); System.out.println(c); 是否包含 Sy 阅读全文
posted @ 2019-11-27 16:47 北儿陌丫~ 阅读(99) 评论(0) 推荐(0)
摘要: 3、浅谈一下String, StringBuffer,StringBuilder的区别?(面试题) 6、下面的代码将创建几个字符串对象? String s1 = new String("Hello"); String s2 = new String("Hello"); String s=hello; 阅读全文
posted @ 2019-11-27 15:56 北儿陌丫~ 阅读(174) 评论(0) 推荐(0)