Monday, December 16, 2013

[Java] Describe the relationship between an object and its defining class


When used in object-oriented programming, a class is a factory for creating objects. (We are talking here about the non-static part of the class.) An object is a collection of data and behaviors that represent some entity (real or abstract). A class defines the structure and behaviors of all entities of a given type. An object is one particular "instance" of that type of entity. For example, if Dog is a class, than Lassie would be an object of type Dog.

Remarks
Text posted above does not means is the model answer, I posted here for an reference to someone who interested the titled topic only, if there is sth incorrect, please leave a comment comment so that i can correct it, many thanks!

Reference:
1) Introduction to Java Programming, Y. Daniel Liang

2) http://math.hws.edu/javanotes/c5/quiz_answers.html

No comments :

Post a Comment