I am appearing for my
SCJP exam soon, and so was brushing up on my
Java basics when I bumped into this tricky question.
Hope someone in here can shed some light on it.
From what I understand,
An ObjectInputStream basically lets you read a byte version(from an underlying stream) of an Object written
by a corresponding ObjectOutputStream.
A FilterInputStream lets you manipulate(or add new functionality to) data read from an underlying input stream.
Why then, isn't ObjectInputStream a sublass of FilterInputStream? Or am I missing something here?
This looks like a design decison to me, and quite frankly, a little too advanced for SCJP, but I'd still like to know the reason behind it, as it
has been bothering me for a while
. Thanks.