In general, data is stored in a computer in the form of bits (1 or, 0). There are various coding schemes available specifying the set of bytes represented by each character.
ASCII − Stands for American Standards Code for Information Interchange. It is developed by American standards association and is the mostly used coding system. It represents characters using 7 bits and has includes 128 characters: upper and lowercase Latin alphabet, the numbers 0-9, and some extra characters).
Unicode (UTF) − Stands for Unicode Translation Format. It is developed by The Unicode Consortium. if you want to create documents that use characters from multiple character sets, you will be able to do so using the single Unicode character encodings. It provides 3 types of encodings.
The following table lists the number of bits used in Java to represent various coding standards.
|ASCII||7 bits (represented as 8 bits).|
|UTF-8||8, 16 and, 18bit patterns.|
|UTF-16||16 bits and larger bit patterns.|