Why Java uses Unicode System?

Java Programming Java8Object Oriented ProgrammingJava Technologies

Unicode is a 16-bit character encoding standard and is capable to represent almost every character of well-known languages of the world.

Before Unicode, there were multiple standards to represent character encoding −

  • ASCII   - for the United States.

  • ISO 8859-1 for Western European Language.

  • KOI-8 for Russian.

  • GB18030 and BIG-5 for Chinese.

So to support multinational application codes, some character was using single byte, some two. An even same code may represent a different character in one language and may represent other characters in another language.
To overcome above shortcoming, the unicode system was developed where each character is represented by 2 bytes. As Java was developed for multilingual languages it adopted the unicode system.

So lowest value is represented by \u0000 and highest value is represented by \uFFFF.

Updated on 15-Jun-2020 05:59:25