Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mistake on the book???

 
HaoZhe Xu
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
question on the CD:
You have to send a gif image to the client as a response to a request. How will you acquire the 'out' variable to do this?
I chose OutputStream out = response.getOutputStream();
but the answer is ServletOutputStream out = response.getOutputStream();
the reason is it is more specific, is it right???
 
Jason Mowat
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hao,

That is correct. In JWeb, it states that although the answer you provided was correct, the other one is more specific.

Cheers,
Jason

P.S. I did the same thing :-)
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!