Given:
11.
String test = "Test A. Test B. Test C.";
12.
// insert code here
13.
String[] result = test.split(regex);
Which regular expression, inserted at line 12, correctly splits test into "Test A", "Test B", and "Test C"?
A. String regex = "";A developer is creating a class Book, that needs to access class Paper. The Paper class is deployed in a JAR named myLib.jar. Which three, taken independently, will allow the developer to use the Paper class while compiling the Book class? (Choose three.)
A. The JAR file is located at $JAVA_HOME/jre/classes/myLib.jar.Given:
11.
public void go(int x) {
12.
assert (x > 0);
13.
switch(x) {
14.
case 2: ;
15.
default: assert false;
16.
}
17.
}
18.
private void go2(int x) { assert (x < 0); }
Which statement is true?
A. All of the assert statements are used appropriately.Given:
5 import java.util.*;
6 public class SortOf {
7 public static void main(String[] args) {
8 ArrayList
11 Collections.sort(a);
12 a.add(2);
13 Collections.reverse(a);
14 System.out.println(a);
15 }
16 }
What is the result?
A. [1, 2, 3, 5]Given a pre-generics implementation of a method:
11.
public static int sum(List list) {
12.
int sum = 0;
13.
for ( Iterator iter = list.iterator(); iter.hasNext(); ) {
14.
int i = ((Integer)iter.next()).intValue();
15.
sum += i;
16.
}
17.
return sum;
18.
}
What three changes allow the class to be used with generics and avoid an unchecked warning? (Choose three.)
A. Remove line 14.Given:
10.
interface Data { public void load(); }
11.
abstract class Info { public abstract void load(); }
Which class correctly uses the Data interface and Info class?
A. public class Employee extends Info implements Data { public void load() { /*do something*/ } }Given:
31.
class Foo {
32.
public int a = 3;
33.
public void addFive() { a += 5; System.out.print("f "); }
34.
}
35.
class Bar extends Foo {
36.
public int a = 8;
37.
public void addFive() { this.a += 5; System.out.print("b " ); }
38.
} Invoked with: Foo f = new Bar(); f.addFive(); System.out.println(f.a);
What is the result?
A. b 3Given:
11.
public interface A { public void m1(); }
12.
13.
class B implements A { }
14.
class C implements A { public void m1() { } }
15.
class D implements A { public void m1(int x) { } }
16.
abstract class E implements A { }
17.
abstract class F implements A { public void m1() { } }
18.
abstract class G implements A { public void m1(int x) { } }
What is the result?
A. Compilation succeeds.Given that the elements of a PriorityQueue are ordered according to natural ordering, and:
2.
import java.util.*;
3.
public class GetInLine {
4.
public static void main(String[] args) {
5.
PriorityQueue
6.
pq.add("banana");
7.
pq.add("pear");
8.
pq.add("apple");
9.
System.out.println(pq.poll() + " " + pq.peek());
10.
}
11.
}
What is the result?
A. apple pearClick the Exhibit button. Which statement is true about the classes and interfaces in the exhibit?

Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Oracle exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 1Z0-851 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.