Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Question 42)  RSS feed

 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question 42)
Which statements are correct about servlets implementing the SingleThreadedModel interfaces
1) Only one thread at a time will acces the service method
2) The servlet container may decide to create a pool of the servlet instances
3) The member variables are thread safe
4) none of the above

author's answer is 4), but I think 1) and 2) are correct. please correct me if I am wrong, thanks
 
g madhava
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Lee:
You are right with your choices. The author is wrong.
 
Rishi Yagnik
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hell friends
I think only (1) is correct how it can be (2) ans is correct pls explain me
Rishi
 
Mikalai Zaikin
Ranch Hand
Posts: 3403
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
you guys should carefully read the question one more time:
SingleThreadedModel is not the same as SingleThreadModel.
cheers
 
riohk kurn
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, this question is a trick (spelling), I don't think it will be tested in real exam.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!