No products in the cart.

Difference between immutable and mutal type

CBSE, JEE, NEET, CUET

CBSE, JEE, NEET, CUET

Question Bank, Mock Tests, Exam Papers

NCERT Solutions, Sample Papers, Notes, Videos

Difference between immutable and mutal type
  • 1 answers

Gaurav Seth 3 years, 7 months ago

<th>Sr. No.</th> <th>Key</th> <th>Mutable object</th> <th>Immutable object</th>
1 Basic We can modify the state of a mutable object after it is created We can't modify the state of the object after it is created.
2  Thread safe Mutable objects are not thread safe Immutable objects are thread safe.
3 Final Mutable class are not final To create an immutable object, make the class final
4 Example By default all class and it's object are mutable by nature. String and all wrapper class  are the example of immutable classes
http://mycbseguide.com/examin8/

Related Questions

What are called tokens
  • 2 answers

myCBSEguide App

myCBSEguide

Trusted by 1 Crore+ Students

Test Generator

Test Generator

Create papers online. It's FREE.

CUET Mock Tests

CUET Mock Tests

75,000+ questions to practice only on myCBSEguide app

Download myCBSEguide App