1, process-oriented design ideas and object-oriented design ideas (for example: I want to go to Xinjiang)----oriented process: I drive, I hang up, I step on the accelerator, I have Hebei ... ---Object-oriented: I ordered the car to Xinjiang, the car is not my business (information encapsulated in the interior of the car, I do not need to know the whole process of driving the car) 2, a class is an abstract concept used to describe an object of the same type, which defines the static and dynamic properties that this class of objects have. ---class can be seen as a template for a class of objects, and objects can be seen as a concrete instance of this type. 3. Relationships between classes (objects)---association relationships---Inheritance (general and special)---aggregation relationships (whole and part): Aggregation (loosely) + combination (inseparable)---implementation relationship 4, Object-oriented programming how to think: There are those classes and objects in---problem---each kind and object should have those attributes---classes and classes have those relationships 5, Java and object-oriented---objects are the core of Java programs, in Java programs "Everything Jie objects"--- Objects can be seen as a wrapper for static properties (member variables) and dynamic properties (methods)---Classes are "templates" for creating objects of the same type, defining the member variables and methods that the class object should have in a class. ---JSDK provides many classes for programmers to use, as well as a programmer to define their own classes. 6, member variable---member variable will be assigned by default 7, the Java language in addition to the basic type of variable type is referred to as the reference type---The object in Java is by reference to its Operation 8, the rule of law---class name capitalized---variable name, Method first Letter Lowercase---Use hump identification 9, overloading: A class can define multiple methods with the same name, but with different parameters. When called, the corresponding method is selected according to the different parameter tables. 10. This appears in the Declaration of the method of the class, and represents a reference to the object that uses the method. ---when you must indicate who is currently using the method, if there is this---sometimes use this to handle member variables and parameter names in a method---this can be thought of as a variable whose value is a reference to the current object. 11. Package and Import statements---in order to facilitate the management of a large number of classes in big software systems, to solve the naming conflicts of classes, the Java ingest (packages) mechanism, provides a class of multi-class namespaces.
12. The object class is the root class for all Java classes.
13, 14, polymorphic existence of three conditions:---to have an inheritance---to have a rewrite---the parent class reference to the Subclass object 15, dynamic binding refers to the "period of execution" (rather than the compilation period) to determine the actual type of the referenced object, according to its actual type call its corresponding method. 16, abstract class:---with the abstract keyword to decorate a class, this class is called abstract class, when using abstract to modify a method, the abstract method must be overridden,---the class containing abstract methods must be declared abstract class, the abstract class must be inherited, the abstract method must be re- ---Abstract classes cannot be instantiated,---abstract methods only need to be declared, but not implemented. 17. Final keyword---Final variable value cannot be overridden------final member variable------final local variable (formal parameter)---The final method cannot be overridden---Final class cannot be inherited 18, interface(interface)---interface (interface) is a collection of definitions of abstract methods and constant values---essentially, an interface is a special abstract class that contains only the definitions of constants and methods, without the implementation of variables and methods. 19, the characteristics of the interface---interface can be multiple implementations; The properties declared in the---interface default to public static final, or only public static final; only abstract methods can be defined in the---interface, and these methods are public by default. can only be public; The---interface inherits other interfaces and adds new properties and abstract methods. 20.
Third, Java object-oriented