Analyst Integration Question:

Download Job Interview Questions and Answers PDF

Explain Immutable class mean?

Integration Programmer Interview Question
Integration Programmer Interview Question

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 Interview Questions And Answers PDF

Previous QuestionNext Question
Explain create a mock object?Can you please explain the difference between valid and well-formed XML?