Why are strings immutable in Java?
Strings in java are frequently used for hashmap keys. Now if someone changes the value of the string it will cause severe discrepancies. Hence strings are made immutable.
Is This Answer Correct ? | 0 Yes | 0 No |
How to create packages in java?
How will you calculate the depth of a binary tree if the tree contains 15 nodes?
What is a numeric digit?
What is toarray method in java?
Where is jre installed?
What do you mean by hashing?
What is a singleton class in Java? And How to implement a singleton class?
Can we override constructor?
What is the reason behind using constructors and destructors?
What is deserialization?
What do you mean by scope of variable?
What language is pass by reference?