Enterprise Java MCQs with Answers Set 3

Enterprise Java Questions and Answers Set 3


Set 1           Set 2           Set 3

Questions 21 to 30


21. Which method of the servlet is/are called several times in its life?  

(a) init()
(b) doPost() 
(c) destroy()
(d) Both (a) and (b) above
(e) Both (a) and (c) above.

22. Which EJB uses EJB-QL for query operations?            

(a) BMP Entity Bean 
(b) CMP Entity Bean
(c) Session Bean
(d) Message-Driven Bean
(e) MCP Entity Bean.

23. Which object is used to forward the request processing from one servlet to another?    

(a) ServeltContext
(b) ServletConfig
(c) RequestDispatcher
(d) ResponseDispatcher
(e) ResponseRedirect.

24. Which is not a valid scope for Java bean in JSP?       

(a) Page
(b) Session
(c) Request
(d) Application
(e) Global.

25. Which of the following allows substitution of code to occur at the translation time in a JSP page?                                 

(a) <jsp:include> Tag
(b) <@ include> directive
(c) <@ page > directive
(d) Declaration block
(e) None of the above.

26. Which of the following property of Java Bean represents a single value?     

(a) Simple property 
(b) Boolean property 
(c) Indexed property
(d) Both (a) and (b) above
(e) Both (b) and (c) above.

27. Which of the following is used to redirect the response from a servlet to a JSP page? 

(a) response.sendRedirect() 
(b) request.sendRedirect() 
(c) request.forward()
(d) response.forward() 
(e) request.dispatch().

28. Which of the following is true for Java Bean?    

(a) It can not be a GUI component
(b) It never implements serializable interface
(c) It has zero-argument constructor
(d) It is a distributed component
(e) It has a non zero argument constructor.

29. Which of the following is not true for <jsp:useBean> tag in JSP page?    

(a) Locates a bean instance
(b) Stores object reference of the bean in a variable
(c) Creates an instance if fails to locate the bean instance
(d) Does not execute the body tag if any
(e) All the above.

30. Which of the following are not an implicit object in JSP?      

I. Request. 
II. Session. 
III. Vector. 
IV. In.

(a) Both (I) and (II) above
(b) Both (II) and (III) above 
(c) Both (I) and (III) above 
(d) Both (II) and (IV) above 
(e) Both (III) and (IV) above.

Answers And Explanation 


           Ans                               Explanation

21.         B       dopost() method of the servlet is called several times in its life.

22.         B       cmp entity bean uses ejb-ql for query operations.

23.         C       Request Dispatcher is used to forward the request processing from one servlet 
                        to another.

24.         E       Global is not a valid scope for java bean in Jsp.

25.         B       <@ include> directive allows substitution of code to occur at the translation 
                        time in a JSP page

26.         D       simple property and bolean property represents a single value.


27.         A       response.sendRedirect() is used to redirect the response from a servlet to a 
                        JSP page.

28.         C       java bean has a zero-argument constructor

29.         D       jsp:use bean tag is not used to execute the body of tag if any.

30.         E       vector and in are not implicit objects.



15 comments :

  1. This comment has been removed by the author.

    ReplyDelete
  2. Java Beans Interview Questions and Answers
    http://allinterviewquestionsandanswerspdf.blogspot.in/2016/06/top-57-java-beans-interview-questions.html

    ReplyDelete
  3. IT series The Concepts of Information Technology Introduction to Computers & Information Technology Free Education Computers And Software Education website

    Visit: http://itseries.net

    itseries.net

    ReplyDelete
  4. Nice Blog!! Thanks For Sharing!!!Wonderful blog & good post.Its really helpful for me, waiting for a more new post. Keep Blogging!
    Live Streaming Company in Bhubaneswar
    Server Management Company in Delhi

    ReplyDelete
  5. Excellent Blog! I would like to thank for the efforts you have made in writing this post. I am hoping the same best work from you in the future as well. I wanted to thank you for this websites! Thanks for sharing. Great websites! Now please do visit our website which will be very helpful.
    machine learning course bangalore

    ReplyDelete
  6. The main motive of the Big data service providers is to spread the knowledge so that they can give more big data engineers to the world.

    ReplyDelete
  7. This was an amazing -write-up. The way you arranged the words is simply phenomenal. Arranging text logically reminds me of the exclusive Dissertation Editing Help by the MyAssignmentHelpAU platform. The assignments prepared by their experts require the support of comprehensive research content, accurate details, and a clear focus on the fundamental concepts. The writing and editing professionals are available 24/7 to assist you with a diverse range of topics and assignment formats immediately.

    ReplyDelete
  8. Great post.
    taxi in jodhpur
    https://driveindiabyyogi.com/car-rental-in-jodhpur-taxi-service-in-jodhpur/

    ReplyDelete
    Replies
    1. Great post.
      taxi in jodhpur
      https://driveindiabyyogi.com/car-rental-in-jodhpur-taxi-service-in-jodhpur/

      Delete
  9. Well write.
    https://driveindiabyyogi.com/car-rental-in-jodhpur-taxi-service-in-jodhpur/

    ReplyDelete
  10. Affordable prices and discounts - We combine quality with affordability as we know that many of our customers are on a https://essaysforme.com/analytical-essay-writing-service budget. You can also pick up discounts from offers we send through email, or by ordering papers over a certain length.

    ReplyDelete
  11. Risk Management: Crypto trading https://www.bidsbee.com/terminal/ can be highly volatile and risky. It's important to have a risk management strategy in place, including setting stop-loss orders and not investing more than you can afford to lose.

    ReplyDelete