1Z0-850 | What Actual 1Z0-850 braindumps Is?


Q11. - (Topic 2) 

Which is a requirement to use applets in a web browser? 

A. The Java compiler must be installed on the client. 

B. A web container must be installed at the server. 

C. The Java Runtime Environment must be installed on the client. 

D. The Java Plug-in must be installed on the server. 

Answer:

Q12. - (Topic 2) 

Which two are true? (Choose two.) 

A. Multiplicity indicators are optional, but if they are included they must be shown at both ends of an association. 

B. Multiplicity indicators must always be shown at both ends of an association. 

C. An optional association is shown using the multiplicity indicator 0..1. 

D. The multiplicity indicators + and 1..* are equivalent. 

E. The multiplicity indicators * and 1..* are equivalent. 

F. 2..4 is a valid multiplicity indicator. 

Answer: C,F 

Q13. - (Topic 1) 

How can the two class paths be set for the javac compiler? (Choose two.) 

A. using the PATH environment variable 

B. using the -classpath option to java 

C. using the CLASSPATH environment variable 

D. using the -sourcepath option to javac 

E. using the -classpath option to javac 

F. using the BIN environment variable 

G. using the -classes option to javac 

Answer: C,E 

Q14. - (Topic 1) 

Which two are true about HTML? (Choose two.) 

A. It is used by the browser to display the client user interface. 

B. It contains APIs that are used to access data in an RDBMS. 

C. It is an object-oriented programming language. 

D. It can be generated dynamically by servlets. 

Answer: A,D 

Q15. - (Topic 1) 

Click the Exhibit button. Which correctly implements the relationship shown in the diagram? 

A. class Cat { 

Dog d; 

class Dog { } 

B. class Cat { } 

class Dog { 

Cat c; 

C. class Cat { } 

class Dog { } 

D. class Cat { 

Dog d; 

class Dog { 

Cat c; 

Answer:

Q16. - (Topic 1) 

Which two keywords directly support looping? (Choose two.) 

A. foreach 

B. switch 

C. while 

D. if 

E. for 

Answer: C,E 

Q17. - (Topic 2) 

Which is an advantage of applets over HTML/JavaScript clients? 

A. In their default state, applets have access to the client's computer. 

B. Applets can use a wider variety of UI components. 

C. Applets are downloaded more quickly to the client. 

D. Applets are more widely supported by browsers. 

Answer:

Q18. - (Topic 1) 

Which two describe benefits of encapsulation? (Choose two.) 

A. Code is more useful because attributes of the class can be accessed by other classes for both reading and writing. 

B. Code is more efficient because attributes of the class can be accessed directly by other classes, without the overhead of going through access methods. 

C. Code is more reusable because the attributes of the class are protected from direct modification by other code. 

D. Code is more flexible because the attributes can be modified directly from code in other packages. 

E. Code is safer because attributes of the class CANNOT be directly modified by code outside the class. 

Answer: C,E 

Q19. - (Topic 2) 

You need an algorithm that must: 

.Iterate through an array of primitive integers 

.Print the value of each array element in index order If the value of the element is equal to 10, print 

the value of the element, and then terminate the iteration 

Which method correctly implements the algorithm? 

A. public static void foo(int[] list) { 

for(int i:list) { 

System.out.println(i); 

if (i==10) break; 

B. public static void foo(int[] list) { 

while(list.length > 0) { 

System.out.println(i); 

if (i==10) break; 

C. public static void foo(int[] list) { 

for(int i=0; i < list.length; i++) { 

System.out.println(i); 

if (i==10) break; 

D. public static void foo(int[] list) { 

for(int i=0; i < list.length; i++) { 

System.out.println(i); 

if (i==10) continue; 

E. public static void foo(int[] list) { 

for each(int i in list) { 

System.out.println(i); 

if (i==10) terminate; 

Answer:

Q20. - (Topic 1) 

Given: 

1.

 public class Foo { 

2.

 int size; 

3.

 public static void main(String[] args) { 

4.

 Foo f = new Foo(); 

5.

 f.setSize(5); 

6.

 Foo g = f.go(f); 

7.

 System.out.print(f.size + " : " + g.size); 

8.

 } 

9.

 void setSize(int s) { 

10.

 size = s; 

11.

 } 

12.

 public Foo go(Foo g) { 

13.

 g.setSize(2); 

14.

 return g; 

15.

 } 

16.

 } 

What is the result? 

A. Compilation fails. 

B. 2 : 5 

C. 5 : 5 

D. 2 : 2 

Answer: