It is more faster and easier to pass the Oracle 1Z0-850 exam by using Practical Oracle Java Standard Edition 5 and 6, Certified Associate Exam questuins and answers. Immediate access to the Regenerate 1Z0-850 Exam and find the same core area 1Z0-850 questions with professionally verified answers, then PASS your exam with a high score now.

2016 Oct 1Z0-850 practice question

Q81. - (Topic 1) 

Given: 

1.

 public class Boat{ 

2.

 // insert code here 

3.

 public void setGas(int v){ 

4.

 gas = v; 

5.

 } 

6.

 } 

Which, inserted at line 2, is valid and demonstrates encapsulation? 

A. protected int gas; 

B. private int gas; 

C. public int gas; 

D. struct int gas; 

Answer:


Q82. - (Topic 1) 

You need an algorithm that must: 

Print the characters of a String, in index order 

Skip all instances of the character 'a' that appear in the String 

Given: 

2.

 public void foo (String s) { 

3.

 // insert code here 

4.

 } 

Which two, inserted independently at line 3, correctly implement the algorithm? (Choose two.) 

A. int i = 0; 

while (i < s.length()) { 

if (s.charAt(i) != 'a') { 

System.out.print(i); 

i++; 

B. for(char c:s) { 

if (c != 'a') System.out.print(c); 

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

char c = s.charAt(i); 

if (c != 'a') System.out.print(c); 

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

if (s.charAt(i) != 'a') System.out.print(i); 

E. int i = 0; 

while (i < s.length()) { 

if (s.charAt(i) != 'a') { 

System.out.print(s.charAt(i)); 

i++; 

Answer: C,E 


Q83. - (Topic 2) 

Given: 

2.

 class Test { 

3.

 public static void main(String args[]) { 

4.

 for (int i = 1; i < 5; i++) { 

5.

 if (i == 2) { 

6.

 continue; 

7.

 } 

8.

 System.out.print(" i = " + i); 

9.

 } 

10.

 } 

11.

 } 

What is the result? 

A. i = 1 i = 3 i = 4 i = 5 

B. i = 1 i = 2 i = 4 

C. i = 1 i = 2 i = 4 i = 5 

D. The code runs with no output. 

E. i = 1 i = 3 i = 4 

F. Compilation fails. 

G. i = 1 

Answer:


Q84. - (Topic 1) 

Given: 

1.

 interface Pet { } 

2.

 class Dog implements Pet { } 

3.

 class Beagle extends Dog { } 

Which three are valid? (Choose three.) 

A. Pet a = new Dog(); 

B. Dog d = new Beagle(); 

C. Dog f = new Pet(); 

D. Beagle c = new Dog(); 

E. Pet e = new Beagle(); 

F. Pet b = new Pet(); 

Answer: A,B,E 


Q85. - (Topic 1) 

Which two are characteristics of an RDBMS? (Choose two.) 

A. An RDBMS represents data using three-dimensional tables. 

B. J2EE provides a cross-platform RDBMS. 

C. Java technologies provide capabilities for connecting a legacy RDBMS to a web 

application. 

D. Business-tier applications use session beans to represent rows in an RDBMS. 

E. An RDBMS represents data using two-dimensional tables. 

Answer: C,E 


Most recent 1Z0-850 exam topics:

Q86. - (Topic 1) 

Which four are legal declarations? (Choose four.) 

A. String st = null; 

B. String st = "Hello"; 

C. String st == 'Hello' 

D. String st = 'Hello' 

E. String st == "Hello"; 

F. String[] st = new String[1]; 

G. String st = new String("Hello"); 

Answer: A,B,F,G 


Q87. - (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:


Q88. - (Topic 1) 

Given: 

interface Writable { } 

interface Erasable { } 

Which three are valid? (Choose three.) 

A. public class Pencil implements Erasable,Writable { /*...*/ } 

B. public interface Pencil extends Writable { /*...*/ } 

C. public interface Pencil implements Writable { /*...*/ } 

D. public class Pencil implements Writable { /*...*/ } 

E. public class Pencil extends Writable { /*...*/ } 

Answer: A,B,D 


Q89. - (Topic 1) 

You are asked to create code that defines a Beverage, and includes method implementation code for some beverage behaviors. Beverage subtypes will be required to provide implementations of some, but not all, of the methods defined in Beverage. 

Which approach correctly implements these goals? 

A. Create an abstract Beverage class that defines only abstract methods. 

B. Create a Beverage interface that all beverage subtypes must implement. 

C. Create an abstract Beverage class that defines both abstract and concrete methods. 

D. Create a concrete Beverage class that defines both abstract and concrete methods. 

Answer:


Q90. - (Topic 2) 

You are asked to create a Dog class that exposes the Dog class String name and int breed to other code as read-only attributes, provides encapsulation, and adheres to the standard JavaBeans naming conventions. 

Which approach implements these requirements? 

A. Provide public name() and public breed() methods in the Dog class, and mark the name and breed instance variables private. 

B. Provide public getName()/setName() and public getBreed()/setBreed() methods in the Dog class, and mark the name and breed instance variables private. 

C. Provide private getName() and private getBreed() methods in the Dog class, and mark the name and breed instance variables private. 

D. Provide private name() and private breed() methods in the Dog class, and mark the name and breed instance variables public. 

E. Provide public getName() and public getBreed() methods in the Dog class, and mark the name and breed instance variables private. 

Answer: