why string is not taking as primitive datatypes but we r
taking it as a class? why explain it?
Answer Posted / 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 |
Post New Answer View All Answers
how we can make a write-only class in java?
How do you sort a set in java?
Can we define constructor in inner class?
If system.exit (0); is written at the end of the try block, will the finally block still execute?
What are unchecked exceptions in java?
What is nested class?
How can you set an applet’s height and width as a percentage?
Why is stringbuffer thread safe?
What is a java list?
Difference between class#getinstance() and new operator ?
Find the value of a specified element of the array arr[i] where 0 <= i <= n-1
Will set allow duplicates in java?
What is passed by reference and pass by value ?
How do you read and print a string in java?
What is the use of arraylist class in java?