Abstract: This article is a reflection on the previous post of bbs c/C ++. When I saw the post, I suddenly felt that I had timed out. It seems that I am getting unfamiliar here. This article attempts to discuss how the access control operator works,
In Java:
The access permissions in Java include public, private, protected, and default package access permissions. If the attribute methods in the class do not show the specified access permission, the package access permission is granted, I like
In Java, the three reserved words are used to modify the data members and member functions of the class, and the class itself. In C ++, the data members and member functions of the modifier class, and the inheritance of the class, but you don't need
Class Concept: A class is a collection of objects that have the same properties and operations. It provides a uniform abstract description of all objects that belong to the class, including properties and operations in two main parts. In an
Summarize:1. The difference between protected and private is that the access designator limit of the protected can be accessed by the member functions of the derived class, and private cannot2. The difference between protected and publice is that
The member function of a class is one of the functions, its usage and function is basically the same as the functions described earlier, it also has the return value and the function type, it differs from the general function only: it belongs to a
First:Private, Public,protectedthe access scope of the access designator. Private: only by 1. Functions in this class,2. Its friend function access. The object of the class cannot be accessed by any other access. protected: can be 1. Functions in
This article is to introduce the difference between the three of them in PhP5, the three of them are used in the class, but the properties are completely different.
Public: Common property or method
Can be called by Self::var or Self::method in a
What this article brings to you is about how to define a class in PHP. PHP definition of a class method, there is a certain reference value, the need for friends can refer to, I hope to help you.
Object-oriented Basic concepts
Consists of 3 parts:
Access rights for class members in the Delphi XEA total of 6 keywords are provided to restrict access:Public, private, protected, published, automated strict private, strict protectedTheir respective meanings are:1. Strict private:The field or
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.