假设我们有一个String str ="count".
String str = "count";
long c1 = str.length();
long c2 = str.codePoints().count();
System.out.println(c1==c2);//true
Run Code Online (Sandbox Code Playgroud)
这里c1和c2的值都相同.所以我的问题是,当我们在程序中使用length()和codePoints().count()方法时?
java ×1