why java has the size of character 2 byte ,while in c/c++ it
is of 1 byte?
Answer Posted / kunal modi
Because c/c++ is based on the ASCII
And there is only 0 to 255 characters
And 1 byte is enough for represent
256 characters (2*power8=256)
Because c/c++ only support american
Characters
But in java its used the unicode because
It carry all character exist in world
And only 3100-3200 characters present in
World and 1 byte can only store 256
Characters that's why in java char take
2 byte and it can carry (2*power16=65536)
Characters
| Is This Answer Correct ? | 17 Yes | 1 No |
Post New Answer View All Answers
differences between iterator and spliterator in java se 8?
Which instutute is offering course for rhino jain slee
What are jpa annotations?
How do javabeans work?
What are the advantages of java 8’s date and time api over old date api and joda time api?
What is gpt and gpc? : java security
I am trying to create a new universal user group. Why can't i? : java security
What about javascript? : java security
What are struts java?
What is xml file in java?
When is static variable loaded? Is it at compile time or runtime? When exactly a static block is loaded in java?
What is the difference between the boolean & operator and the && operator?
Which method is used to create the daemon thread?
What is jpa implementation?
What is difference between map and flatmap in java 8?