Java Learning Object-oriented (conceptual nature) < Good programmer training camp >

Source: Internet
Author: User

<a href= "http://www.goodprogrammer.org/" target= "blank" >android training </a>------My Java notes and look forward to communicating with you!

1. Object-oriented: Three features: encapsulation, inheritance, polymorphism

2. The development process: actually is to look for objects to use. Create an object without an object

3. Relationship of classes and objects.

Real-life objects: Dick and Harry.

Want to describe: Extract common content from objects. to the specific abstraction.

Description: These objects have the following characteristics: Name, age, gender, and learning Java functions.

Mapped to Java, the description is class defined by class.

The specific object is that Java is used to establish entities in heap memory with new.

The class is: a description of things in real life.

Object: It is this kind of thing, the real existence of the individual.

4. member variables and local variables.

Scope: the member variable acts on the entire class, and the local variable variable acts in the function, or in the statement.

Location in memory: Member variable: In heap memory, because the object exists, it exists in memory, local variable: exists in stack memory.

5. How to use anonymous objects one: When a method on an object is called only once, it can be done with an anonymous object, which is easier to write. If you make more than one member call to an object, you must give the object a name.

How to use anonymous objects two: You can pass an anonymous object as an actual parameter.

Java Learning Object-oriented (conceptual nature) < Good programmer training camp >

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.