What is an immutable object, JAVA Programming

What is an immutable object?

An immutable object is one that we can't change once it's created. Steps involved in creation of an immutable object are:

Make all of its data fields private.

Methods that can perform changes in any of the data fields after construction of object should be avoided.


Posted Date: 9/9/2013 2:03:37 AM | Location : United States

Related Discussions:- What is an immutable object, Assignment Help, Ask Question on What is an immutable object, Get Answer, Expert's Help, What is an immutable object Discussions

Write discussion on What is an immutable object
Your posts are moderated
Related Questions
How is method overriding different from method overloading? Overriding involves the creation of two or more concepts with the same name and same signature in different classes

JMS is the ideal high-performance messaging stage for intra business messaging, with full programmatic control over quality of service and delivery options. JavaMail gives lowes

Describe Importing Classes in java? Fully qualified names such as java.net.URL are not the most convenient thing to have to type. You can use the shorter class names like URL w

Hi i need help creating a small program that basically asks the user how many numbers hes going to use and then ask for those numbers and see which is the biggest and the smaller

I need Crime Management Project Description: It is a web based project build in Oracle(back end) and J2EE(front end)  for peoples so they will register complaints online.

#question)i) devising ii) validating and iii) testing of algorithms...

Question: (a) Java does not support multiple inheritance but does provide the concept of ‘interface'. Explain how interfaces can help a programmer to implement multiple inheri

Explain what occur when an object is created in Java?

Running a sample Java web application from the web get http 404 error