I want to remember again the difference between interface and abstract that appears in java.
interface --Just declare (define) the numbers together -(Implementation is implemented and used) -(Cannot instantiate because it is not a class) --If you define an interface type as a formal argument, all classes that inherit that type can be received as arguments.
abstract --Interface function + Can be implemented --If you define an abstract type as a formal argument, all classes that inherit that type will be accepted as arguments. --Cannot instantiate Implement and use a class that inherits the abstract class
Recommended Posts