JavaSE ??????????
???????????? ???????[ 2016/11/21 11:18:15 ] ????????????? Java
????1.???????????? ???????Java?б????String???????????????λ??java.lang?У?????string??????????
????String s = new String(); //???????????????
????????
????String s = new String(“helloworld”); //????????????????
????2.?????????????
????????????????????С??????????????????????????String??????String??????length()???????ж????????????????????????????????????е????????
????????????£?
?????????1.length();//?????????1??????
????if(pwd.length()>=6)//?ж??????????С?????6λ??
????{
????System.out.print(“??????? “);
????}else
????System.out.print(“?????????С?? 6 λ??”);
????2.?????????
??????Java???????????????equals()????????????????????????????????????????????????????????????????????????ж??????????????????Сд??
???????????
?????????1.equals(?????2);//?????????????????????????????????????????Сд
??????==?????equals ????????????????????????==??????????????????????ж????????????????????????ж??true???????
????false
??????????????Сд??
??????equals ??????????Сд????????????????????Сд???????????????????????Сд??
????equalsIgnoreCase();//????????????Сд??
????????????
?????????1.equalsIgnoreCase(?????2);
????Java?л?????????Сд???????
????toLowerCase()???????????е????????Сд??
????toUpperCase()???????????е??????????д??
????????????????
?????????.toLowerCase();//?????????Сд???
?????????.toUpperCase();//???????????д???
????????????????????Сд?????
????3.???????????concat
?????????????У?????????????????????????????“”+“”????????
??????????????????
????System.out.println(“A??”+ a + “B??” + b);//???????abc?????
??????????????concat??????????
????String s=new String(“A”);
????String name=new String(“B”);
????String sentence=s.concat(name);
????System.out.println(sentence);
????3.???????????split
???????????
???????????.split(String separator??int limit);
?????????
????????????
?????????
?????????
?????????????
????????
???????????
????4.StringBuffer??
????StringBuffer??????????????棬?????????????????????????????????????????????????????μ??????
???????StringBuffer???????
????1.????StringBuffer??????????
????2.???StringBuffer????
?????????StringBuffer????????
????1.`?????1.toString();//?? StringBuffer ?????????? 1 ???? String ?????????????
???????磺
????String s1=sb2.toString(); // ???? String ??
????2.?????1.append(????);//????????????????1?????
?????÷????? String ??? concat()???????????????????????????????????????檔??
??????????? String ?????? String ?????????????????????????? StringBuffer
??????????κ???????????????????
????3.
???????磺????? 1.insert(λ???????);//??????????????? 1 ?????λ??(int ????)???????????????????? String ???κ???
???????
????**??????????????????????????????????????????????????????????????Ч??????????????????????д??????
??????
???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11