This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes InputStream Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "InputStream" Watch "InputStream" New topic


Ranch Hand

Joined: Jul 20, 2000
Posts: 112
Hi All,
I think the answer to the below question is
b. A file.
I'm I right ? What about the others ? ARe they not.

Which of these can act as a source for an input stream as well as a destination for an output stream?
a. A network Connection
b. A file
c. A pipe
d. A string
e. An array of chars.

N Mukherjee
Ranch Hand

Joined: Jun 08, 2000
Posts: 141
Hi aruna,
I think all four except "string" option are correct.
Any comments?

"Knowledge is Power"****************<A HREF="" TARGET=_blank rel="nofollow">THREAD/SCJP RESOURCES</A>
Sachin Kombrabail

Joined: Aug 28, 2000
Posts: 14
The InputStream is an abstract class whose subclasses are
ByteArrayInputStream, FileInputStream, FilterInputStream, InputStream, ObjectInputStream, PipedInputStream, SequenceInputStream, StringBufferInputStream
Ranch Hand

Joined: Jul 20, 2000
Posts: 112
But the answer given is 1,2,& 3....... ?

I agree. Here's the link:
subject: InputStream
It's not a secret anymore!