Analyst Integration Question:

Explain Immutable class mean?

Tweet Share WhatsApp

Answer:

A class is said to be Immutable if its state cannot be changed once created, for example String in Java is immutable. Once you create a String say "Java", you cannot change its content. Any modification in this string e.g. converting into upper case, concatenating with another String will result in new object. Immutable object are very useful on concurrent programming because they can be shared between multiple threads without worrying about synchronization. In fact, whole model of functional programming is built on top of Immutable objects.

Download Integration Programmer PDF Read All 41 Integration Programmer Questions
Previous QuestionNext Question
Explain create a mock object?Can you please explain the difference between valid and well-formed XML?