";System.out.println("text:"+text);System.out.println("textlength:"+text.length());System.out.println("chars:"+Arrays.toString(text.toCharArray()));System.out.println("charslength:"+text.toCharArray().length);System.out.println("byteslength:"+text.getBytes().length);System.out.println("byteslength:"+text.getBytes(StandardCharsets.UTF_16).length);System.out.println("n1:"+"杰西卡(AdrienneBarbeau饰)的".charAt(0));System.out.println("n2:"+text.charAt(text.indexOf("杰")));System.out.println("n3:"+text.getBytes(StandardCharsets.UTF_16)[12]);System.out.println("n4:"+text.getBytes(StandardCharsets.UTF_16)[13]);System.out.println("n5:"+text.getBytes(StandardCharsets.UTF_16)[14]);System.out.println("n6:"+text.getBytes(StandardCharsets.UTF_16)[15]);}}
Copyright © 2025