why java has the size of character 2 byte ,while in c/c++ it
is of 1 byte?

Answer Posted / chandan

Java was created around the time when the Unicode standard had values defined for a much smaller set of characters. Back then it was felt that 16-bits would be more than enough to encode all the characters that would ever be needed. With that in mind Java was designed to use UTF-16. In fact, the char data type was originally used to be able to represent a 16-bit Unicode code point.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe life cycle of thread?

578


How should I format my code? How should I comment my code?

491


What is meant by framework in java?

510


Why oracle type 4 driver is named as oracle thin driver?

455


What is the difference between ec2 and lambda?

480






What is native class in java?

507


What is meant by code profiling?

496


What is cache in java?

508


What is war file in java?

572


What if the main method is declared as private?

472


Is java an api?

469


What does jpa mean?

498


What is proxy object in java?

573


What is the difference between swing and awt components?

641


What is the difference between a jdk and a jvm?

493