What do you mean by immutable ? How to create an immutable object ?

What do you mean by immutable ? How to create an immutable object ?

Immutable objects means the value of that object can not be modify by applying operations on them. Java Provides the String class to create the mutable string objects.

String s = new String(\"Immutable string.\");  

By:Jalees
Date:2015-01-09 00:00:00

Post Your Answers


User Email:

User Name:
Answers:

Related Java Subjective Links

Java Subjective interview questions and answers for experienced and fresher