摘要:
1、replace() String str= "mesquite in your cellar" str.replace('e', 'o') returns "mosquito in your collar" 由此可知replace是全替换的。 建议:单引号全部改为双引号,避免编译出错,有时可能操 阅读全文
posted @ 2016-12-28 16:43
快乐的骑马哥
阅读(4682)
评论(0)
推荐(0)
摘要:
从字面意思可知这个方法就是比较的意思。 所以该方法有如下两种情况: 1、比较前后的两个字符不相同: (1) String str = "Hello World"; String anotherString = "hello world"; System.out.println( str.compar 阅读全文
posted @ 2016-12-28 12:49
快乐的骑马哥
阅读(169)
评论(0)
推荐(0)
浙公网安备 33010602011771号