Online Java Compiler By
JavaTpoint.com
public class CharactercodePointCountMethodExample3{ public static void main(String args[]) { String str1 = "Hello everyone"; System.out.println("Hello everyone"); int Total1 = str1.codePointCount(3, 9); System.out.println(Total1 + " is generated because method counts the first argument."); String str2 = "Everday is a fun day"; System.out.println("Everyday is a fun day"); int Total2 = str2.codePointCount(6, 8); System.out.println(Total2 + " is generated because method counts the second argument."); } }
Output