DRAG DROP
Select and Place:

Select and Place:

DRAG DROP
Select and Place:

Given:
10.
public class Foo {
11.
static int[] a;
12.
static { a[0]=2; }
13.
public static void main( String[] args ) {}
14.
}
Which exception or error will be thrown when a programmer attempts to run this code?
A. java.lang.StackOverflowErrorGiven:
11.
public class Person {
12.
private name;
13.
public Person(String name) {
14.
this.name = name;
15.
}
16.
public int hashCode() {
17.
return 420;
18.
}
19.
}
Which statement is true?
A. The time to find the value from HashMap with a Person key depends on the size of the map.Given:
5.
import java.util.Date;
6.
import java.text.DateFormat;
21.
DateFormat df;
22.
Date date = new Date();
23.
// insert code here
24.
String s = df.format(date);
Which code fragment, inserted at line 23, allows the code to compile?
A. df = new DateFormat();Given:
12.
import java.util.*;
13.
public class Explorer2 {
14.
public static void main(String[] args) {
15.
TreeSet
16.
TreeSet
17.
for(int i = 606; i < 613; i++)
18.
if(i%2 == 0) s.add(i);
19.
subs = (TreeSet)s.subSet(608, true, 611, true);
20.
s.add(629);
21.
System.out.println(s + " " + subs);
22.
}
23.
}
What is the result?
A. Compilation fails.Given:
1.
public class Threads4 {
2.
public static void main (String[] args) {
3.
new Threads4().go();
4.
}
5.
public void go() {
6.
Runnable r = new Runnable() {
7.
public void run() {
8.
System.out.print("foo");
9.
}
10.
};
11.
Thread t = new Thread(r);
12.
t.start();
13.
t.start();
14.
}
15.
}
What is the result?
A. Compilation fails.DRAG DROP
Select and Place:

Given:
22.
public void go() {
23.
String o = "";
24.
z:
25.
for(int x = 0; x < 3; x++) {
26.
for(int y = 0; y < 2; y++) {
27.
if(x==1) break;
28.
if(x==2 andand y==1) break z;
29.
o = o + x + y;
30.
}
31.
}
32.
System.out.println(o);
33.
}
What is the result when the go() method is invoked?
A. 00Nowadays, 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.