Java i.o FilterInputStream
Can FilterInputStream class be classed as an instantiated class or not?
I am struggling to understand this, this is not an abstract class but it
has a protected constructor which means only subclasses can instantiate
this.
Now do I say FilterInputStream class can be instantiated or not? Because
If I try something like this:
FilterInputStream fis = new FilterInputStream(null);
It will complain, but of course if say
FilterInputStream fis = new DataInputStream(null);
than this works fine.
Sorry for such a novice question, I tend to think this probably has
nothing to do with java i.o. but its a question of more to do with access
control and possibly wider OOP concepts.
Anyway i'd be happy to get an opinion on this. Thanks.
No comments:
Post a Comment