Java - Encoding

Tags: charset

1. Java source file and the String in it
It can be any charset.

2. Java class file and the String in it
compiled from Java source file by the Java compiler, always in Unicode(UTF-16) charset

3. Get JVM current charset

java.nio.charset.Charset.defaultCharset()