Abstract base classes and interfaces can use Keywordabstact to create abstract classes that cannot be instantiated and can use Keywordabstact to describe a method that has not yet been implemented in detail, which cannot include a method body an abstract method can only be created in an abstract class. When the class is inherited, the abstract method must be implemented in detail, or the inheriting class is declared as a drawing class
Interfacekeyword is further than the Abstact class, and does not agree that there are methods to define interfaces that provide a perfect separation between interfaces and implementations, 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 can proactively discover when an object is not used and then destroy it
In Java, all classes finally 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