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 string is not taking as primitive datatypes but we r
taking it as a class? why explain it?

Answers were Sorted based on User's Feedback



why string is not taking as primitive datatypes but we r taking it as a class? why explain it?..

Answer / ankit

All primitive types have fixed memory size. Now in case of
the String, its length is not fixed and so is its size.
That's why it cannot be a primitive data type.

Is This Answer Correct ?    5 Yes 2 No

why string is not taking as primitive datatypes but we r taking it as a class? why explain it?..

Answer / payel

String should be class so that it can be immutable and
making String immutable, makes it thread safe and
thus imporves performance.

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More Core Java Interview Questions

what is mutual exclusion? How can you take care of mutual exclusion using java threads? : Java thread

0 Answers  


Can we use switch statement with strings?

0 Answers  


What is the difference between Stream Reader and Stream Writer?

4 Answers  


Can Exception handling we can handle multiple catch blocks?

0 Answers   PUCIT,


What things should be kept in mind while creating your own exceptions in java?

0 Answers  


What is a generic type?

0 Answers  


What is the class in java?

0 Answers  


Who developed JScript language?

3 Answers  


Howto get an object that will perform date & time calculations then format it for output in some different locales with different date style.can ne1 tel me the answer of this question.pls

0 Answers  


Can a Byte object be cast to a double value?

3 Answers   KO,


What is comparator in java?

0 Answers  


Which collection object is faster to retrieving the data and inserting the data into it.

2 Answers   Jamcracker, Virtusa,


Categories