Java study notes 1

xiaoxiao2021-03-05  23

I have seen the second version of Java programming ideas to see 5 chapters, but there is no one for the programs you have compiled. After work, it is really difficult to get into the heart, but give up the school's learning content is a bit reluctant.

Chapter 6 inherits

Creating a class of Java is definitely inherited. If it is not inherited, it will inherit the Object class.

When planning a inheritance, the method is typically set to public, set all the fields to private, so that the classes other than the package can inherit it.

In the builder of the derived class, Java automatically inserts the call to the underlying class builder to ensure the initialization of the basic class. However, when the basic class builder has an argument, it is necessary to clarify the base class builder Super (i) in the derived class builder.

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

New Post(0)