1Z0-850 | What Precise 1Z0-850 pdf Is?


Q91. - (Topic 1) 

Which is valid? 

A. package com.example; 

class Test { } 

import java.util.*; 

B. package com.example; 

import java.util; 

import java.*; 

class Test { } 

C. package com.example; 

import java.util.*; 

import java.io.*; 

class Test { } 

D. import java.util.*; 

package com.example; 

class Test { } 

E. package com.example; 

package com.sun; 

import java.util.*; 

class Test { } 

Answer:

Q92. - (Topic 1) 

Given: 

17. class B { } 

Which demonstrates inheritance? 

A. class A extends B { } 

B. class A this B { } 

C. class A super B { } 

D. class A implements B { } 

Answer:

Q93. - (Topic 1) 

Given: 

1.

 class Test { 

2.

 public static void main(String args[]) { 

3.

 int num1 = 10, num2 = 20, result; 

4.

 result = calc(num1, num2); 

5.

 System.out.println(result); 

6.

 } 

7. 

8.

 // insert code here 

9.

 } 

Which, inserted at line 8, produces the output 30? 

A. static int calc(int n1, int n2) { return n1 + n2; } 

B. static void calc(n1, n2) { return (n1 + n2); } 

C. public int calc(int n1, int n2) { return; } 

D. static int calc(int n1, int n2) { return; } 

E. public int calc(int n1, int n2) { return n1 + n2; } 

F. static int calc(int n1, n2) { return n1, n2; }; 

Answer:

Q94. - (Topic 1) 

Which two are true about javax.swing? (Choose two.) 

A. It includes classes for creating buttons and panels. 

B. It is used to create MIDlets. 

C. It is used to create applications that have the same user interface on different platforms. 

D. It uses the native GUI components of each platform. 

Answer: A,C 

Q95. - (Topic 2) 

Given: 

11.

 class A { 

12.

 public void methodX(int i) { /* some code */ } 

13.

 public String methodY(String s) { /* some code */ } 

14.

 } 

15.

 class B extends A { 

16.

 public void methodX(int i) { /* some code */ } 

17.

 public String methodX(String s) { /* some code */ } 

18.

 public String methodY(String s) { /* some code */ } 

19.

 } 

Which two are true? (Choose two.) 

A. The methodY(String) in class B overrides methodY(String) in class A. 

B. The methodY(String) in class B overloads methodY(String) in class A. 

C. The methodX(String) in class B overrides methodX(int) in class A. 

D. The methodX(int) in class B overrides methodX(int) in class A. 

E. The methodX(int) in class A overloads methodX(String) in class B. 

Answer: A,D 

Q96. - (Topic 2) 

Which three about JMS are true? (Choose three.) 

A. JMS is the acronym for Java Mail Service. 

B. JMS provides a common way for Java programs to access an enterprise messaging system's messages. 

C. JMS supports an event-oriented approach to message reception. 

D. JMS supports both synchronous and asynchronous message passing. 

E. JMS does NOT depend on MOM (Messaging-Oriented Middleware) products. 

Answer: B,C,D 

Q97. - (Topic 1) 

Which statement is true? 

A. JMS enables an application to provide flexible, asynchronous data exchange. 

B. JMS provides interfaces to naming and directory services. 

C. The JMS API is located in the java.jms package. 

D. JMS enables an application to provide tightly coupled, distributed communication. 

Answer:

Q98. - (Topic 1) 

What is the definition of the acronym SQL? 

A. Special Queue Language 

B. Structured Query Language 

C. Special Query Language 

D. Structured Queue Language 

E. System Query Language 

F. System Queue Language 

Answer:

Q99. - (Topic 1) 

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. The code runs with no output. 

B. Compilation fails. 

C. str != str2 

D. str = str2 

Answer:

Q100. - (Topic 2) 

Click the Exhibit button. Which is an abstract class? 

A. Mouse 

B. Cat 

C. Dog 

D. Rabbit 

Answer: