Student level question, I'm hoping stackOverflow can help me gain a deeper understanding here:
I've noticed that many of the methods (such as those in Graphics2D, for example) in the Java API have "abstract" modifiers. Why is this?
I'm just wrapping my head around inheritance and polymorphism right now, but as I understand it, an abstract class is meant to be used as a kind of "parent class" that is extended by sub-classes, and that abstract classes themselves cannot be instantiated.
I also understand that abstract methods are declared (but not implemented) in an abstract class, and supposedly must be implemented within a subclass for that subclass to be considered non-abstract (and to therefore be instantiable).
So, how is it that I'm able to import a class like Graphics2D, create an instance of it and use its abstract methods?
My instructor mentioned something about the methods being overwritten at run-time (?), but I don't understand how/why. Obviously I'm missing something here, I'd love more insight!