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
Where are group policies stored? : java security
Explain issues of old java date api?
How do I install eclipse?
What is exe file in java?
Write a class which checks whether a given number is prime or not. Write another class to implement the behavior of previous class and print the series of twin prime number upto a given range.
What is a driver in java?
What are struts java?
How long can a lambda function run?
What is java lang exceptionininitializererror?
What about products that claim to detect malicious applets? : java security
What is a stream in java?
Is eclipse a jdk?
What is dependency injection in java?
Topic- looping,function overloading,nesting ,polymorphism. Aim - to write a function with a name buzz-buds,that will check whether the given numbers are buddies or not on the basis of no. of parameters passed during function calling.
How do javabeans work?