Object-oriented ing ...

xiaoxiao2021-03-06  107

The concept of classes and objects is a class. Animals are a class. The pig is a subclass. It inherits the properties and methods of animals (animals will walk, will be called), and have their own characteristics, for example, it will Arch. You create an example with pigs: pig A = new pig (); this, a is pointing to an example, now able to say A is an instance. A is an example of a pig generation, A is a head pig, its name is a.

转载请注明原文地址:https://www.9cbs.com/read-98868.html

New Post(0)