What is inheritance? What is an abstract class and what is an interface? (In Java)
Anónimo
Inheritance is considered an "is-a" relationship. It imports classes into other classes without that class needing to create an object. Any public methods or variables are able to be used by the class inheriting from the super-class. It's a mechanism for code reuse. An abstract class is denoted by the abstract keyword, and simply means that it has abstract methods. These methods have been declared but are uninitialized, and are meant to be initialized by the inheriting class. The interface is essentially an empty class with initialized, but empty, methods.