Instance

What Does Instance Mean?

An instance is simply defined as a case or occurrence of anything. In computer technology, this could be an element, document type, or a document that conforms to a particular data type definition (DTD).

Advertisements

An object belonging to a particular class, such as in Java, may also be described as an instance. Instances of a class share the same set of attributes, but each instance may differ in terms of what is contained in those attributes.

Techopedia Explains Instance

For example, a school class includes the following attributes: school_Name, school_Location, no_Of_Students and school_Board. These attributes are local to the school class and apply to every instance of the class. Consider two instances of a school class. Let the first instance include the values Thames Valley School, London, 355, and St.Thomas Board, respectively for the previously mentioned attributes, while the second instance includes values Cambridge Public School, West Hampshire, 200, and Cambridge Board, respectively. The two instances are distinct from each other and exist independant of each other. However, the basic structure of the class stays the same.

Advertisements

Related Terms

Margaret Rouse
Technology Expert

Margaret is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical business audience. Over the past twenty years, her IT definitions have been published by Que in an encyclopedia of technology terms and cited in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine, and Discovery Magazine. She joined Techopedia in 2011. Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages.