Best Quality of 1Z0-850 test materials and courses for Oracle certification for IT professionals, Real Success Guaranteed with Updated 1Z0-850 pdf dumps vce Materials. 100% PASS Java Standard Edition 5 and 6, Certified Associate Exam exam Today!

2016 Oct 1Z0-850 test engine

Q161. - (Topic 2) 

Which technology is used to develop components that interact with server-side objects in a web-based application? 

A. XML 

B. servlets 

C. HTML 

D. JavaScript 

Answer: B 


Q162. - (Topic 2) 

Which two are true? (Choose two.) 

A. A class that extends another class CANNOT be well encapsulated. 

B. If class B is well encapsulated, then class A can access class B's instance variables only through a method invocation. 

C. A class with a public instance variable CANNOT be well encapsulated. 

D. Polymorphism only applies when one class encapsulates another. 

Answer: B,C 


Q163. - (Topic 2) 

Given: 

5.

 // insert code here 

6.

 public void eat(); 

7.

 } 

8. 

9.

 // insert code here 

10.

 public void eat() { 

11.

 System.out.println("eating dinner"); 

12.

 } 

13.

 } 

Which, inserted at lines 5 and 9, allows the file to compile? 

A. 5. class Animal { 

9. public class Tiger implements Animal { 

B. 5. interface Animal { 

9. public class Tiger implements Animal { 

C. 5. class Animal { 

9. public class Tiger subclasses Animal { 

D. 5. interface Animal { 

9. public class Tiger extends Animal { 

E. 5. class Animal { 

9. public class Tiger extends Animal { 

F. 5. interface Animal { 

9. public class Tiger subclasses Animal { 

Answer: B 


Q164. - (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; } 

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

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

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

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

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

Answer: D 


Renovate 1Z0-850 exam question:

Q165. - (Topic 2) 

Given: 

1.

 public class Bar { 

2.

 int size; 

3.

 public static void main(String[] args) { 

4.

 Bar b = new Bar(); 

5.

 b.size = 27; 

6.

 int i = b.go(b.size); 

7.

 System.out.print(b.size + " : " + i); 

8.

 } 

9.

 public int go(int size) { 

10.

 size++; 

11.

 return size; 

12.

 } 

13.

 } 

What is the result? 

A. 27 : 28 

B. Compilation fails. 

C. 27 : 27 

D. 28 : 28 

E. 28 : 27 

Answer: A 


Q166. - (Topic 1) 

Which two are associated with the web tier in a J2EE web-based application? (Choose two.) 

A. servlets 

B. JAX-RPC 

C. JMS 

D. entity beans 

E. JSP 

Answer: A,E 


Q167. - (Topic 1) 

Given: 

3.

 int num = 0, count; 

4.

 while ( num < 3 ) { 

5.

 num++; 

6.

 // insert code here 

7.

 System.out.println("num = " + num + " : count = " + count); 

8.

 } 

9.

 } 

Which, inserted at line 6, produces the following output? 

num = 1 : count = 1 num = 1 : count = 2 num = 2 : count = 1 num = 2 : count = 2 num = 3 : count = 1 num = 3 : count = 2 

A. while ( ++count < 3 ) { 

B. for ( count = 1 ; count < 3 ; count++ ) { 

C. for ( count = 0 ; count < 3 ; count++ ) { 

D. while ( ++count < 2 ) { 

E. for ( count = 1 ; count < 2 ; count++ ) { 

Answer: B 

Topic 2, Volume B 


Q168. - (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: A