Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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);
    }
}