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
What are the different ways to handle exceptions?
What is the difference between a break statement and a continue statement?
What class of exceptions are generated by the java run-time system?
Explain java coding standards for interfaces?
Can a boolean be null java?
What is a Hash Table? What are the advantages of using a hash table?
How hashset works internally in java?
describe method overloading
If we allocate the memory using 'new' & de-allocated using 'free' then what will happen?
What is immutable class in java?
How do you check if a character in a string is a digit or letter?
What is a values collection view ?
Is sizeof a keyword in java programming?
Where is java located?
How do you sort a list in java?