Java software engineer php-14-Object-oriented

Source: Internet
Author: User
Java programmers learn php-14. object-oriented similarities: 1. also class + Method 2. multi-inheritance is not allowed. you can also use interfaces to implement multi-inheritance. there are also abstract classes 5. there are also static methods 6. you can also disable extension by using the final keyword: 1. the default accessmodifier of the class itself does not have the accessmodifier2. the default accessmodifier is public java programmer learning php-14. object-oriented
Similarities:
1. it is also a class + method
2. Multi-inheritance is not allowed.
3. there are also interfaces that can be used to implement multiple inheritance
4. there are also abstract classes
5. There are also static methods
6. you can also disable extension using the final keyword.

Differences:
1. the class itself does not have access modifier
2. the default access modifier for attributes and methods is public, without the concept of package visibility.
3. getter and setter are not required for each attribute. a set of common _ get () and _ set () are supported.
4. class-level constants are allowed, but static variables are not allowed.

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.