Self Java's object-oriented day06_Java

Object-oriented thinking Overview

Java is an object-oriented programming language, object-oriented programming is an idea, under the guidance of our object-oriented thinking, the use of the Java language to design, develop computer programs. The object here refers to the reality of all things, every thing all have their own attributes and behaviors. Object-oriented computer programming is in process, referring to the reality of things, the properties of the characteristics of things, abstracted behavioral characteristics, describe the design ideas into computer events. It is different from the process-oriented thinking, the emphasis is achieved by calling the object's behavior, rather than trying to operate step by step to achieve.

Object-oriented and process-oriented difference

  • Process-oriented : emphasis step, when the need to implement a function of each specific steps to be hands-on, detailed processing of every detail.
  • Object-oriented : emphasis on the object, when the need to achieve a functional, specific steps do not care, but to find a function that already have a person to help me do a thing.

The relationship between classes and objects

What is the class
  • Class : is a group of related properties and behavior of the collection. It can be seen as a kind of template of things, use things attribute characteristics and behavioral characteristics to describe this kind of things.
What is the object
  • Object : a class is a concrete manifestation of things. Object is an instance of a class, it must have the properties and behavior of such things.
The relationship between classes and objects
  • Class is a description of a class of things, is the abstract of.
  • Objects are instances of a class of things, are specific to.
  • Class is a template object, the object is a class of entities.

Guess you like

Origin www.cnblogs.com/wurengen/p/11565514.html