---
title: "Why String is immutable in Java ?"  
description: "Why String is immutable in Java ?"  
author: "Anonymous User"  
published: 2015-07-07  
updated: 2020-09-20  
canonical: https://www.mindstick.com/interview/2689/why-string-is-immutable-in-java  
category: "java"  
tags: ["java", "string"]  
reading_time: 1 minute  

---

# 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.

## Answers

### Answer by Anonymous User

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.


---

Original Source: https://www.mindstick.com/interview/2689/why-string-is-immutable-in-java

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
