1. equals () and = = Operators
-Equals is a method, and = = is an operator (or, of course, a generalized method, or ultimately a calling method).
-Equals () is inherited from the object class, in object where equals is the = = operator that is called directly.
-in Equals, how to compare, you can define yourself, and the = = operator is directly compared to the variables directly stored in the value.
-For 8 basic types, variables are stored in values, so the = = operator compares their values (different base types can also be compared, such as int and char).
-For an object, a variable holds a reference to the object, such as String str = new String ("Roger"); STR stores the address of the object. Therefore, different objects, even if their values are the same, are not necessarily the same.
2. Abstract class
-classes that contain abstract methods, so to understand abstract classes, first understand the abstract methods
-Abstract method
-No specific implementation, must be modified with an abstract
-Must be public, because such inheritance and implementation must be allowed. (If private, you cannot inherit from the Quilt class.) Default is Public
-Abstract class
-Cannot define the object (because there is a broken method, even if it is defined as a disabled object, useless)
-If the subclass does not implement all of its abstract methods, the subclass is also an abstract class.
3. Interface
-the interface refers to a method or function that is called by others. So it can be seen as an abstraction of behavior.
-Can contain variables and methods
-Variable: Implicitly specified as public static final. In general, variables are not defined in the interface.
-method: Implicitly specified as public abstract.
-All methods in an interface must be abstract methods (abstract classes can have non-abstract methods.)
-cannot contain static code blocks and static methods (abstract classes can have).
4. Interface and abstract class comparison
-syntactically: can be differentiated by definition
-Design
-Abstract classes are abstractions of a class of things, that is, abstractions of classes. And an interface is an abstraction of behavior.
-Interfaces are the norm for behavior, and abstract classes regulate behavior and attribute.
The more confusing points of knowledge in Java