Is there any reason why Java char primitive data type is 2 bytes unlike C which is 1 byte?
Thanks
In previous languages like C ASCII notations are used. And the range is 127 , for 127 unique symbols and language characters.
While JAVA comes with a feature called "INTERNATIONALIZATION", that is all the Human Readable characters(Including Regional symbols) are also added into it , and the range is also increased , so more the memory required , the system to unify all these symbols is "Standard Unicode System", and so that this Unification requires that additional byte in JAVA.
The first byte remains as it is and ASCII characters are ranged to 127 as in C,C++ but unified characters are than appended to them.
So 16-bits for char in JAVA and 8-bits for char in C.