This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Mock Exam Questions

 
munna next
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Everyone,

These are some of the Mock Exam Questions. I am not sure about the answers. Can any one Pl explain what the correct answers could be.

Thanks
Munna.

1. When are transactions propagated from a Web component (JSP or Servlet) to an Enterprise Java Bean (EJB) component?

A. Only when the Web component starts the transaction using the UserTransaction interface
B. When the Web component starts the transaction using the UserTransaction interface or when transactions are demarcated in the component deployment descriptor
C. When the Web component starts the transaction using the Transaction interface
D. Only when the Web component is declared to use container managed transactions
E. When transaction demarcations are declared in the Web component deployment descriptor

1. Answer A.
-------------------
2. How do you access tag body content from a JSP Custom Tag?
A. getPageContext().getString()
B. body.getString(1)
C. bodyContent.getString()
D. getPageContext.getReader()
E. getBodyContent()

2. Answer E.
------------------------------
3. Java Server Pages (JSP) contain a mixture of different elements.
Referring to the statement above, which one of the following CANNOT be used in JSPs?
A. Java scriptlets
B. HTML
C. Java bean deployment information
D. References to Java Beans
E. JavaScript

3.Answer C.
--------------------------------
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think your answers are correct.

1. A
2. E
3. C
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic