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 |
Tell me a few examples of final classes defined in Java API?
What are runtime exceptions?
How do generics work in java?
What is oop principle in java?
What is jit and its use?
Write a program to reverse a number in java?
What happens if I remove static from main method?
Is main an identifier?
How do you start a thread?
How to overcome the exception object reference not set to an instance of object?
What is the maximum size of a string in java?
Catch(Exception e){ } in that what is Exception and purpose of that in that place exactly?