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) {
        char ch1 = '\u4d00', ch2;

        ch2 = Character.reverseBytes(ch1);

        String str = "Reversing bytes on ch1 gives " + ch2;

        System.out.println(str);
    }
}