• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

FilterInputStreams

 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
FilterInputStream takes what arguments?
A.InputStream
B.FilterInputStream
C.File
D.Reader
E.RandomAccessFile
F.PrintStream
 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Antra,
I think u can get the answer to this question from the API:
FilterInputStream(InputStream in)
Surya
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Surya B:
Hi Antra,
I think u can get the answer to this question from the API:
FilterInputStream(InputStream in)
Surya


I met this question before, its answer is A.
but why b is wrong? FilterInputStream is a subclass of InputStream, so i think answer is A, B.
 
antraarora
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I was thinking A,B too. Surya, can you help?
 
Surya B
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Antra
The constructor of FIflterInputStream is
FilterInputStream(InputStream in)
So the answers as pointed out by Mick are a,b since
FilterInputStream is a subclass of InputStream.
Surya
 
Ranch Hand
Posts: 114
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think the question is ambiguous, and probably would be phrased more clearly in the real exam. If the question is what objects can be passed as parameters, the correct answers should be A and B. If the question asks for which object the FilterInputStream constructor is explicitly declared to accept as parameter, only A is correct.
Just my two cents...
-Mirko

Originally posted by antraarora:
I was thinking A,B too. Surya, can you help?


 
After some pecan pie, you might want to cleanse your palatte with this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic