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
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 |
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 |
How can we make copy of a java object?
Do you know how to reverse string in java?
Does constructor creates the object ?
How are this() and super() used with constructors in java programming?
How many threads can java run?
What is the Dictionary class?
Explain the features of interfaces in java?
What is the immediate parent class of the Applet class?
string is immutable? right every one knows that, my question is it advantage or disadvantage making string immutable?
What does exclamation mean in java?
How to declare objects of a class ?
0 Answers Akamai Technologies,
How do you sing an Applet ?