Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are orm tools in java?

1000


What are the new features about Java se 8 ?

897


What is gwt in java?

899


What is the locale class?

934


What is a stream in java?

938


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

964


What is persistence xml in java?

873


i have client interview in TCS.client is CITI BANK.how to face it,what type of questions they will ask,please tell send me to kumar525job@gmail.com

13989


What is http session in java?

982


Why are command line arguments passed as a string?

916


What is exe file in java?

967


What is flatmap in rxjs?

925


What is the difference between lambdas and delegates?

995


how can we create the ui using netbeans,having the code?

2071


Where is java installed?

862