Question 17 of 60
Consider the following servlet code:
public MyServlet extends GenericServlet implements SingleThreadModel, Runnable
public void run()
Which of the following statements are correct?
Select 1 correct option.
a The servlet container can run multiple threads simultaneously on the same instance of this servlet.
b The servlet container CANNOT run multiple threads simultaneously on the same instance of this servlet.
c It'll not compile because a servlet cannot implement Runnable.
d It'll compile but will throw exception at request time.
e None of these.
here answer is e.
if a,b,c,d are wrong then what happens exactly, i mean it should have given compiler error or runtime error, if not both then it could have excetuted in either of the two ways(single threded or multithreded)
but it is also wrong
Can you please post the question id for this question (the simulator shows it on the top while viewing the question) so that I can investigate?
The closest that I could find is question id com.enthuware.ets.scwcd.v5.2.526 and it has no reference to SingleThreadModel. Please see the attached image.