Java tutorial
public class Main { public static void main(String[] args) { CharSequence seq = "Hello World from java2s.com!"; int beginIndex = 4, endIndex = 8; int res = Character.codePointCount(seq, beginIndex, endIndex); String str = "Number. of Unicode code points is " + res; System.out.println(str); } }