代码: public class TestString { String str = new String("good"); char [] ch = {'a','b','c'}; public static void main(String[] args) { // TODO Auto-generated method stub TestString ex = new TestString(); ex.change(ex.str,ex.ch); System.out.println(…
# 按字母表熟悉下string中的方法# A B C D E F G H I J K L M N O P Q R S T U V W X Y Z# 标红的为常用重点的方法!! str = "tanGwei nI hao 你好 "###### A ################### 无###### B ################### 无###### C ##################print(str.count("a")) # 查找字符个数prin…