CodePudding user response:
LZ look for the book entry level and have a look, first find out all kinds of access modifiers(1) is a private member, outside the class cannot access (so you couldn't access the subclass)
(2) is a protected member, cannot access outside the class and subclass (the main function is neither the class nor a subclass)
(3) and (1)
(4) and (2)
(5) and (3), (1)