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) {
        int cp = 0x006f;

        char[] ch = Character.toChars(cp);

        System.out.print("Char array having cp's UTF-16 representation is ");

        for (int i = 0; i < ch.length; i++) {
            System.out.print(ch[i]);
        }
    }
}