1Z0-850 | The Improved Guide To 1Z0-850 practice test


Q71. - (Topic 2) 

Given: 

1.

 class Test { 

2.

 public static void main(String args[]) { 

3.

 String str = "Hello!"; 

4.

 String str2 = "Bye!"; 

5.

 str += str2; 

6.

 str -= str2; 

7. 

8.

 if ( str == str2 ) { 

9.

 System.out.println("str = str2"); 

10.

 } else { 

11.

 System.out.println("str != str2"); 

12.

 } 

13.

 } 

14.

 } 

What is the result? 

A. str != str2 

B. str = str2 

C. The code runs with no output. 

D. Compilation fails. 

Answer:

Q72. - (Topic 2) 

Given: 

1.

 class Test { 

2.

 public static void main(String[] args) { 

3.

 String str = "Hello"; 

4.

 str = str.replace("Bye"); 

5.

 System.out.println("str : " + str); 

6.

 } 

7.

 } 

What is the result? 

A. Compilation fails. 

B. str : HelloBye 

C. str : Byelo 

D. str : Hello 

E. str : Bye 

F. str : HeBye 

G. The code runs with no output. 

Answer:

Q73. - (Topic 1) 

Which is NOT a correct statement about entity beans? 

A. They are persisted using BMP and CMP. 

B. They are used to share data among clients. 

C. They are used to store persistent data. 

D. They are used to implement business processes. 

E. They are used to represent data stored in an RDBMS. 

Answer:

Q74. - (Topic 2) 

Which two are true? (Choose two.) 

A. MIDP does NOT have an API to support text messaging. 

B. J2ME can be used to make network-connected household appliances. 

C. A MIDP device must support wireless downloading of software. 

D. MIDP does NOT have an API to support audio. 

Answer: B,C 

Q75. - (Topic 2) 

Which is a disadvantage of using J2EE server-side technologies in a web-based application? 

A. maintainability 

B. complexity 

C. support for many different clients 

D. scalability 

Answer:

Q76. - (Topic 2) 

Which is true? 

A. JSP developers must learn Java programming to create JavaServer Pages. 

B. JavaServer Pages are translated into servlets before they are executed. 

C. JSP technology output is never displayed to clients. 

D. JSP is defined as JavaScript Pages. 

Answer:

Q77. - (Topic 1) 

Which is an appropriate description of session beans? 

A. They are used to store persistent data. 

B. They are used to implement business processes. 

C. They are used to represent data in an RDBMS. 

D. They are used to share data among clients. 

Answer:

Q78. - (Topic 2) 

Given: 

11.

 interface A { 

12.

 void someMethod(); 

13.

 } 

14.

 class B implements A { 

15.

 public void someMethod() { } 

16.

 } 

Which represents the "program to an interface" principle? 

A. public B make() { return new A(); } 

B. public A make() { return new B(); } 

C. public B make() { return new B(); } 

D. public A make() { return new A(); } 

Answer:

Q79. - (Topic 2) 

Which protocol provides an XML-based, platform-independent means of exchanging structured information? 

A. UDDI 

B. WSDL 

C. JSP 

D. JNDI 

E. SOAP 

Answer:

Q80. - (Topic 1) 

Click the Exhibit button. Which code correctly implements the association between A and B? 

A. class A { 

private B[] b; 

class B { 

private A a; 

B. class A { 

private B[] b; 

class B { } 

C. class A { } 

class B { 

private A[] a; 

D. class A { } 

class B { 

private A a; 

E. class A { 

private B b; 

class B { 

private A[] a; 

F. class A { 

private B b; 

class B { } 

Answer: