摘要: 创建实例: String str = new String();str = "String"; 1、char charAt(int index):返回指定索引位置的字符 1 System.out.println(str.charAt(0)); 2 //return "S"; 2、String sub 阅读全文
posted @ 2020-07-22 20:28 Zero-One- 阅读(149) 评论(0) 推荐(0)
摘要: 代码:public static void main(String[] args) { //两种声明方式,有所差别 String s1="hello"; String s2="hello"; if(s1=="hello"){ System.out.println(s1+"==的判断"); } els 阅读全文
posted @ 2020-07-22 09:56 Zero-One- 阅读(253) 评论(0) 推荐(0)