Day 16

今天继续学习的字符串,学习了字符串的两种比较。用equals词必须完全一样,格式是 boolen b1=equals.a1(a2),用equalsIgnoreCase可以忽略大小写。时也学习了字符串的遍历,字符串的遍历也有两种方法,一种是遍历字符,一种是遍历长度。char a=str.charrAt(整数)。int a=str.length()。接着我学习了字符串的截取,string a=str.substring(int beginIndex,int endIndex),包头不包未。然后我学了替换strint a=str.replace(旧值,新值)。

posted @ 2026-07-27 20:58  火柴君  阅读(5)  评论(0)    收藏  举报