Home
Recent Q&A
Java
Cloud
JavaScript
Python
SQL
PHP
HTML
C++
Data Science
DBMS
Devops
Hadoop
Machine Learning
Azure
Blockchain
Devops
Ask a Question
What is an immutable object? How do you create an Immutable object in Java?
Home
JAVA
What is an immutable object? How do you create an Immutable object in Java?
+1
vote
asked
Jan 24, 2020
in
JAVA
by
rahuljain1
What is an immutable object? How do you create an Immutable object in Java?
#java-immutable
Java-questions-answers
Please
log in
or
register
to answer this question.
1
Answer
+1
vote
answered
Jan 24, 2020
by
SakshiSharma
Immutable objects are those whose state cannot be changed once created. Any modification will result in a new object e.g. String, Integer, and other wrapper class. Please see the answer for step by step guide to creating Immutable class in Java.
Related questions
+1
vote
Q: Can we create an Immutable object, which contains a mutable object?
asked
Jan 24, 2020
in
JAVA
by
rahuljain1
#java-immutable
Java-questions-answers
+2
votes
Q: How can we create an immutable class in Java?
asked
May 4, 2021
in
JAVA
by
SakshiSharma
#immutable-class
java
Java-questions-answers
+1
vote
Q: How to create immutable class in java?
asked
Oct 16, 2020
in
JAVA
by
SakshiSharma
#create-immutable
#immutable-class-java
Java-questions-answers
+2
votes
Q: What is mutable object and immutable object in Java?
asked
May 30, 2020
in
JAVA
by
Robindeniel
#java-immutable-objects
#mutable-objects
#mutable-objects-java
Java-questions-answers
0
votes
Q: How to create object in java?
asked
Oct 27, 2020
in
JAVA
by
sharadyadav1986
#create-object-java
#java-object
Java-questions-answers
0
votes
Q: How many ways to create object in java?
asked
Oct 20, 2020
in
JAVA
by
sharadyadav1986
#create-object-in-java
#object-in-java
#create-object
Java-questions-answers
0
votes
Q: How string is immutable in java?
asked
Oct 18, 2020
in
JAVA
by
sharadyadav1986
#string-immutable-in-java
#string-immutable
#immutable-in-java
Java-questions-answers
+1
vote
Q: Why we can’t create the object of abstract class in java?
asked
Oct 27, 2020
in
JAVA
by
sharadyadav1986
#object-of-abstract-class
#abstract-class
Java-questions-answers
+1
vote
Q: Why are the objects immutable in java?
asked
May 3, 2021
in
JAVA
by
Robindeniel
#objects
immutable
java
Java-questions-answers
+1
vote
Q: Why String is immutable or final in Java
asked
Mar 16, 2021
in
JAVA
by
Robindeniel
#string-java
java-string-immutable
java-final
Java-questions-answers
...