Home >Common Problem >Object contains data and methods of what

Object contains data and methods of what

藏色散人
藏色散人Original
2020-04-23 09:11:224865browse

Object contains data and methods of what

Object contains data and what methods?

The object is the basic running entity, which includes not only data (properties), but also operations (methods) that act on the object and response actions (events) of the object.

Related introduction:

The entity formed by data encapsulation is an object. Objects are instantiations of classes. Some objects are alive, some objects are not.

In real life, an entity is an object, such as a person, a balloon, a computer, etc. are all objects. Such as this car, this person, this house, this table, this plant, this check, this raincoat.

To sum it up: everything is an object.

In object-oriented programming, objects are the basic running entities in the system and are collections of code and data.

Anything that is meaningful in the application field and related to the problem to be solved can be used as an object. It can be an abstraction of a specific physical entity, an artificial concept, or a human being. and something with clear boundaries and meaning.

The above is the detailed content of Object contains data and methods of what. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn