<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 >