Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

just to share

 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hello ranchers,

Just to share this question with all of you.(Enthuware Mock).

Consider the following servlet code:

import javax.servlet.*;
public MyServlet extends GenericServlet implements Runnable
{
public void run()
{
//do something.
}
}

Which of the following statements are correct?
1. The servlet container can run multiple threads simultaneously on the same instance of this servlet.
2. The servlet container CANNOT run multiple threads simultaneously on the same instance of this servlet.
3. It will not compile because a servlet cannot implement Runnable.
4. It will compile but will throw exception at request time.
5. None of these.

Anybody knows the right answer. ??
its 1, 5 are the correct one. I don't undestand the purpose of this question?? normaly we choose "none of these" where rest of the options dosen't fit.
here we have to "none of these" with other option right.

 
Ankit Garg
Sheriff
Posts: 9580
33
Android Google Web Toolkit Hibernate IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well since option 1 is a valid option, so option 5 cannot be the correct answer...
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3817
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This question has already been fixed. Kindly download the latest version from http://enthuware.com/alletsbanks.html ( direct link http://www.enthuware.com/downloads/jwpv5.ets )
 
Poonam Agarwal
Ranch Hand
Posts: 324
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok, thanks Paul
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic