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

differences between iterator and spliterator in java se 8?

891


Which instutute is offering course for rhino jain slee

2219


What are jpa annotations?

851


How do javabeans work?

822


What are the advantages of java 8’s date and time api over old date api and joda time api?

994


What is gpt and gpc? : java security

942


I am trying to create a new universal user group. Why can't i? : java security

866


What about javascript? : java security

950


What are struts java?

844


What is xml file in java?

880


When is static variable loaded? Is it at compile time or runtime? When exactly a static block is loaded in java?

871


What is the difference between the boolean & operator and the && operator?

886


Which method is used to create the daemon thread?

899


What is jpa implementation?

831


What is difference between map and flatmap in java 8?

800