Java Interview Series Part 7
Java Interview Series Part 7
Java INTERVIEW
( PART- 7 )
Developer_pani
Hi Preethi..! I am Pani.
Hey Pani ! Thanks
I am going to take
for giving me this
your technical round.
oppportunity.
I am going to ask
few Java Questions.
okay,
pani.
A String is made
immutable due to the
Apart from the security
following reasons:
aspect, what are the reasons
behind making strings 1. String pool
immutable in Java? 2. Multithreading
3. Collections
1. String Pool
Designers of Java were aware of the fact that
String data type is going to be majorly used by
the programmers and developers. Thus, they
wanted optimization from the beginning. They
came up with the notion of using the String
pool (a storage area in Java heap) to store the
String literals.
To be continued in
next part...
Developer_pani
( Link in Bio )