QUESTION 1
Consider the following:
Which of the quoted values below will be returned for the name field in the SELECT results?
A. ‘ Tom’
B. ‘ Tom ‘
C. ‘Tom’
D. ‘Tom ‘
Answer: B
QUESTION 1
Consider the following:
Which of the quoted values below will be returned for the name field in the SELECT results?
A. ‘ Tom’
B. ‘ Tom ‘
C. ‘Tom’
D. ‘Tom ‘
Answer: B
QUESTION 1
Adam works as a Database Administrator for Pass4sure.com. He creates a table named Students. He wants to create a new table named Class with the help of the Students table. Which of the following syntaxes will Adam use to accomplish the task?
A. CREATE TABLE Class
INSERT INTO SELECT * FROM Students;
B. CREATE TABLE Class
FROM SELECT * FROM Students;
C. CREATE TABLE Class
(SELECT * FROM Students);
D. CREATE TABLE Class
AS SELECT * FROM Students;
Answer: D
QUESTION 1
You are asked to architect an SOA solution that leverages Java web services. The architecture needs to be flexible and allow for the SOAP 1.1, SOAP 1.2, and REST implementations. Which Java EE technology should you use?
A. JAXP
B. JAXB
C. JAX-WS
D. JAX-RPC
Answer: C
QUESTION 1
How would a MIDlet that uses a GameCanvas efficiently update only a small region of the screen, from the data in the off-screen buffer?
A. call flushGraphics(int, int, int, int) that specifies the region to be flushed
B. call serviceRepaints() and set a clip region on the Graphics object in paint()
C. Pixels that are NOT to be flushed should be made transparent.
D. write extra code to coalesce the flushGraphics() calls over many loops into one call
Answer: A
QUESTION 1
What are the three primary roles in a web service interaction? (Choose three.)
A. Broker
B. Facade
C. Provider
D. Decorator
E. Requestor
F. Interceptor
Answer: ACE
QUESTION 1
Which two statements are true about JAXR support for XML registries? (Choose two.)
A. The CapabilityProfile tells a client the capability level of a registry.
B. UDDI registries must support ebXML to be compatible with JAXR.
C. The UnsupportedCapabilityException is processed for errors from non-Java providers.
D. The JAXR API declares methods as level 0 or level 1.
E. JAXR registry clients present an XML schema that defines the infomodel for the provider.
Answer: AD
QUESTION 1
Which two statements are true about XML schemas and WSDL 1.1? (Choose two.)
A. http://schemas.xmlsoap.org/wsdl/ is the WSDL namespace for SOAP binding.
B. xsi is used as a prefix to represent the schema namespace as defined by XSD
C. XSD schemas are used as a formal definition of WSDL grammar.
D. xsd is used as a prefix to represent the schema namespace as defined by XSD
E. http://schemas.xmlsoap.org/wsdl/http/ is the WSDL namespace for SOAP binding.
Answer: CD
QUESTION 1
A developer wants to create a business interface for both local and remote usage. For performance reasons the remote interface should NOT be called by a client in the same JVM. Which statement is required to accomplish this, assuming there is no deployment descriptor?
A. The business methods are defined in one interface which must be annotated with both @Local and @Remote.
B. The business methods are defined twice in one interface. One method is annotated with @Local and the other is annotated with @Remote.
C. The business methods are defined in a common interface by two other interfaces which are annotated with @Local and @Remote respectively. The bean implements the super interface.
D. The business methods are defined in a common interface. It is extended by two interfaces, annotated with @Local and .Remote respectively. Both interfaces are implemented by the bean class.
Answer: D
QUESTION 1
Given the following stateful session bean:
10. @Stateful
11. @TransactionAttributefJransactionAttributeType. SUPPORTS)
12. public class VideoBean implements Video {
13. // insert code here
14. public void methodAO {}
15.}
Assuming no other transaction-related metadata, which code can be added at Line 13 to guarantee that business method methodA will execute only if invoked with an active transaction?
A. @TransactionAttributefJ
B. @TransactionManagement(TransactionAttributeType. CONTAINER)
C. @TransactionAttribute(TransactionAttributeType.MANDATORY)
D. @TransactionAttributeO”ransactionAttributeType.REQUIRES_NEW)
Answer: C
QUESTION 1
Given the relationship:
The tag handler MyTag extends SimpleTagSupport. At runtime, the doTag method throws a SkipPageException.Which three events occur after the SkipPageException is thrown?
(Choose three.)
A. Evaluation of page2.jsp stops.
B. Evaluation of page1.jsp stops.
C. The MyTag instance is NOT reused.
D. Evaluation of page2.jsp continues.
E. Evaluation of page1.jsp continues.
Answer: ACE
QUESTION 1
To take advantage of the capabilities of modern browsers that use web standards, such as XHTML and CSS, your web application is being converted from simple JSP pages to JSP Document format. However, one of your JSPs, /scripts/screenFunctions.jsp, generates a JavaScript file. This file is included in several web forms to create screen-specific validation functions and are included in these pages with the following statement:
10. <head>
11. <script src=’/scripts/screenFunctions.jsp’
12. language=’javascript’
13. type=’application/javascript’> </script>
14. </head>
15. <!– body of the web form –>
Which JSP code snippet declares that this JSP Document is a JavaScript file?
A. <%@ page contentType=’application/javascript’ %>
B. <jsp:page contentType=’application/javascript’ />
C. <jsp:document contentType=’application/javascript’ />
D. <jsp:directive.page contentType=’application/javascript’ />
E. No declaration is needed because the web form XHTML page already declares the MIME type of the /scripts/screenFunctions.jsp file in the <script> tag.
Answer: D
QUESTION 1
Given:
10. class One {
11. void foo() { }
12. }
13. class Two extends One {
14. //insert method here
15. }
Which three methods, inserted individually at line 14, will correctly complete class Two? (Choose three.)
A. public void foo() { /* more code here */ }
B. private void foo() { /* more code here */ }
C. protected void foo() { /* more code here */ }
D. int foo() { /* more code here */ }
E. void foo() { /* more code here */ }
Answer: ACE
QUESTION 1
Given:
1. public class Base {
2. public static final String FOO = “foo”;
3. public static void main(String[] args) {
4. Base b = new Base();
5. Sub s = new Sub();
6. System.out.print(Base.FOO);
7. System.out.print(Sub.FOO);
8. System.out.print(b.FOO);
9. System.out.print(s.FOO);
10. System.out.print(((Base)s).FOO);
11. } }
12. class Sub extends Base {public static final String FOO=”bar”;}
What is the result?
A. foofoofoofoofoo
B. foobarfoobarbar
C. foobarfoofoofoo
D. foobarfoobarfoo
E. barbarbarbarbar
F. foofoofoobarbar
G. foofoofoobarfoo
Answer: D
QUESTION 1
Given a pre-generics implementation of a method:
public static int sum(List list) {
int sum = 0;
for ( Iterator iter = list.iterator(); iter.hasNext(); ) {
int i = ((Integer)iter.next()).intValue();
sum += i;
}
return sum;
}
What three changes allow the class to be used with generics and avoid an unchecked warning? (Choose three.)
A. Remove line 14.
B. Replace line 14 with “int i = iter.next();”.
C. Replace line 13 with “for (int i : intList) {“.
D. Replace line 13 with “for (Iterator iter : intList) {“.
E. Replace the method declaration with “sum(List<int> intList)”.
F. Replace the method declaration with “sum(List<Integer> intList)”.
Answer: ACF