1. What are the three core features of object-oriented technology?
Answer: abstract (encapsulation), polymorphic, inheritance.
2. What is the principle of encapsulation?
A: Packaging principle: 1 Hidden Object properties and implementation details, only public excuses, and control access level;
In object-oriented methods, classes are used to implement the above requirements. The encapsulation is implemented by class, and the encapsulation is used to realize high cohesion and low coupling.
3. Is the method overload?
A: Method overloading refers to defining multiple methods with the same name in a class, but requiring the number of types or parameters for each method to have different parameters. (Parameters are also characteristics of the method)
4. How does the method differ from the load cover?
1, the method's coverage is the relationship between the subclass and the parent class, is the vertical relationship, the overloading of the method is the relationship between the methods in the same class, and is the horizontal relationship.
2. Overrides can only be made by one method, or only by a pair of methods; an overload of a method is a relationship between multiple methods.
3. The override requires the same parameter list, and the overload requires the parameter list to be different.
4, in the coverage relationship, call that method body, is based on the object type (object corresponding to the storage space type) to determine, overload relationship, is based on the invocation of the argument table and formal parameter list to select the method body.
it to
Java Conceptual issues accumulate