Sign up ×
Computer Science Stack Exchange is a question and answer site for students, researchers and practitioners of computer science. It's 100% free, no registration required.

I need a concise definition of the "state of an object" in object-oriented programming (for a paper).

For about half of a day I searched for a paper that I can cite on this topic, but I couldn't find one. All the papers I found were mostly general papers on object-oriented programming and they didn't define the state of an object.

I am unsure, but my best guess is something like: The state of an object is defined by the state of the instance variables of the object.

I am searching for a definition of the state of an object and/or a reference on the topic.

(btw, could I refer to the concept as "object state" or is this uncommon?)

share|cite|improve this question

4 Answers 4

You can take a look to (and cite) the book "Object-Oriented Analysis and Design" by G. Booch:

... An object is an entity that has state, behavior, and identity. The structure and behavior of similar objects are defined in their common class. The terms instance and object are interchangeable.

We will consider the concepts of state, behavior, and identity in more detail in the sections that follow. ...

And there is a whole subsection that describes the concept of state:

... From this example, we may form the following low-level definition.

The state of an object encompasses all of the (usually static) properties of the object plus the current (usually dynamic) values of each of these properties ...

share|cite|improve this answer

You would also want to keep in mind that the state of an object is an "abstract" entity, as determined by what is observable by the methods. For instance, an object that implements a hash table has as its state, the collection of values stored in the hash table, not all the internal representation details.

share|cite|improve this answer

An object-oriented system integrates the terms of code and data using the concept of an "object". An object has state (data) and behavior (code). Hence, the states of object are the instances(variables) inside the object that contains the data.

share|cite|improve this answer
This is true but it doesn't sseem to add a lot to the existing answers. – David Richerby Dec 31 '14 at 18:30
Maybe It'll be easy to understand for someone :) – Syed MEhran Hussain Dec 31 '14 at 18:57

IBM has a glossary that defines the word "state" in several different definitions that are very similar to one another. They don't specifically state that they are related to Object Oriented Programming but one can extrapolate and use them in that context.

Def 3: A stage in the lifecycle of an object that identifies the status of that object.

Def 5: A condition or situation during the life of an object during which it satisfies some condition, performs some activity, or waits for some event.

Def 8: An object's characteristic that is manifested in its public and private data members, and can be divided into two categories: essential state and non-essential state.

Def 9: In a business state machine, one of several discrete individual stages that are organized in sequence to compose a business transaction.

Def 10: A condition in which the circuit remains until application of a suitable pulse.

Webster's New World College Dictionary defines 'state' as:

A set of circumstances or attributes characterizing a person or thing at a given time; way or form of being: condition

The common denominator of all these is time. State changes as time progresses. That is the nature of variables. If someone were to ask, "What is your current state?" You could say today that you are married and tomorrow you could be single.

Considering all these definitions one can extrapolate that 'state' is the way that an object exists at a particular point in time determined by the values of its attributes, namely it's properties/variables.

I don't think it gets any simpler than that.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.