Quantcast
Channel: JavaPins - Stories tagged with immutable
Viewing all articles
Browse latest Browse all 8

Why String is immutable or final in Java

$
0
0
This is one of the most popular interview question on String in Java which starts with discussion of What is immutable object , what are the benefits of immutable object , why do you use it and which scenarios do you use it. This is some time also asked as "Why String is final in Java" . It can also come once interviewee answers some preliminarily strings questions e.g. What is String pool , What is the difference between String and StringBuffer , What is the difference between StringBuffer and Strin...
Pin it

Viewing all articles
Browse latest Browse all 8

Trending Articles