WHY STRING IS IMMUTABLE IN JAVA ?

Mayank Tripathi

Total Post:807

Points:4035
Posted by  Mayank Tripathi
Java  String 
 578  View(s)
Ratings:
Rate this:
  1. Mayank Tripathi

    Post:807

    Points:4035
    Why String is immutable in Java ?

    String is a special type of immutable class. Immutable class is a class which once created, it’s contents can not be changed. Immutable objects are the objects whose state can't be changed once constructed.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!