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 THE MEANING OF ALL TYPE OF BUZZWORDS?

4 Answers  


What is the relationship between a method?s throws clause and the exceptions that can be thrown during the method?s execution?

2 Answers  


How can you debug the Java code?

6 Answers   BirlaSoft,


What is the difference between stringbuffer and stringbuilder?

0 Answers  


Can an object subclass another object?

0 Answers  


How do you differentiate abstract class from interface?

0 Answers  


java is pure object-oriented programming language?why it is platform independent.

1 Answers  


What do you understand by casting in java language?

0 Answers  


What is a reflection package?

2 Answers  


Are arrays immutable in java?

0 Answers  


What are the three best choices for a development environment?

0 Answers  


What is a heavyweight component?

0 Answers  


Categories