0

As far as we can see, FilterInputStream class extends InputStream class. It's simple because FilterInputStream instance "is-a" InputStream instance. But also there is a field which type is InputStream in FilterInputStream class, it means that InputStream is a "part-of" FilterInputStream. They used composition and inheritance both. What kind of problems does this decision solve? What for? Is it just well-known pattern?

igor.tsutsurupa
  • 189
  • 1
  • 6

0 Answers0