Abstract base classes and interfaces can use the keyword Abstact to create abstract classes that cannot be instantiated or use keyword Abstact to describe a method that has not yet been specifically implemented, which cannot contain a method body an abstract method can only be created in an abstract class, and when the class is inherited, the An abstract method must have a specific implementation, or an inherited class is declared as a drawing class
The interface keyword is a step further than the Abstact class, and does not allow for a method-defined interface to provide a perfect separation between interfaces and implementations, and Java does not support multiple inheritance, but can achieve this by implementing multiple interfaces.
C + + places objects on the stack or static storage Java provides a mechanism called the garbage collector, which automatically discovers when an object is not used and then destroys it
In Java, all classes ultimately inherit from the single Ultimate base class object advantage: A single inheritance structure ensures that all objects have some functionality one-root inheritance structure makes the garbage collector's implementation much easier
Exception handling it is thrown from the wrong place and is appropriately designed to handle exception handler captures for specific types of exceptions
C + +: manipulating objects with pointers Java: Referencing an object refers to a remote control, which is equivalent to a TV
Java Programming Lesson II