When I learned about abstract classes is said WT(H*)!!!
QUESTIONS:
- What is the point of creating a class that can’t be instantiated?
- Why would anybody want such a class?
- What is the situation in which abstract classes become NECESSARY?
**if you know what i mean*
interfaceconstruct, some don’t) – it doesn’t know the implementation (that is to be provided by the subclasses / implementing classes)For example:
What the heck is a stream by itself? What kind of stream? a stream to a file? a network? a memory buffer? Each may have different and unrelated ways of reading / writing, but provide a common API. It makes no sense to create just a
Stream, but via theabstractclass, you can code to theStreamAPI without knowing the details: