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 |
What are the different types of java?
Which eclipse is best for java?
What is serial version uid and its importance in java?
How to invoke external process in java.
What is the difference between Abstract Class and Interface
what is for datainputstream?
What is operator overloading. Is it is supported in java?
What are measurable parameters?
What is rmi and steps involved in developing an rmi object?
What is jdbc api?
What are the methods to rectify ambiguities in the interfaces in JAVA?
What is static keyword in java?