当前位置:网站首页>Relationship between classes and objects

Relationship between classes and objects

2022-07-05 00:26:00 The learning path of Java Rookies

class The concept of

1. The essence of class is that some things in the real world have the same characteristics , Extract these common features to form The concept of Cheng
2. Classes are abstract
3. Create objects through classes , It's called object instantiation

The concept of object

The object is the actual individual

The relationship between classes and objects

Class is equivalent to a template , Extract the common features of the object , Class is used to describe the common characteristics of objects
below , Take the cat as an example :
We extract the common features of cats , Cats are formed
Cat objects are specific cats
 Insert picture description here
 Insert picture description here

原网站

版权声明
本文为[The learning path of Java Rookies]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202141125149485.html