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
Question 1: a) What is the meaning of an object-oriented programming? b) List eight simple types of data in Java c) Explain how objects and classes are closely related.

Opengts Geozone violation alerts Project Description: I am seeking a very reliable, articulate and an experienced Java and MySQL developer to customize the Device Communicati

Class diagram technique is vital within Object Oriented functions. Class diagrams illustrate the kinds of objects in the system and the several static relationships among them. Cl

How memory allocated for a object

Develop a simple polling (voting) web application according to the following specifications: 1. Initially a page should be presented to the user where he can enter his/her

Hi, I have an android sdk assignment which is due monday night. The user will enter the following information. url address www.google.com user name huh@gmail.com password 12


I want FitLIFE app for Android, IOS, Windows Project Description: Hello, I want to develop an app for Android, IOS and Windows Phone. This app will be work with open source B

Introduction In this assignment you will use Processing to create some geometric objects and graphical user interface (GUI) elements that Processing itself lacks. Processing h

What is Constructors? Explain with an example? A constructor forms a new instance of the class. It initializes all the variables and does any work essential to prepare the clas