Given:
1.
class Super {
2.
private int a;
3.
protected Super(int a) { this.a = a; }
4.
} ...
11.
class Sub extends Super {
12.
public Sub(int a) { super(a); }
13.
public Sub() { this.a = 5; }
14.
}
Which two, independently, will allow Sub to compile? (Choose two.)
A. Change line 2 to: public int a;Given:
10: public class Hello {
11: String title;
12: int value;
13: public Hello() {
14: title += " World";
15: }
16: public Hello(int value) {
17: this.value = value;
18: title = "Hello";
19: Hello();
20: }
21: } and:
30: Hello c = new Hello(5);
31: System.out.println(c.title);
What is the result?
A. HelloDRAG DROP
Select and Place:

Given:
11.
public class Rainbow {
12.
public enum MyColor {
13.
RED(0xff0000), GREEN(0x00ff00), BLUE(0x0000ff);
14.
private final int rgb;
15.
MyColor(int rgb) { this.rgb = rgb; }
16.
public int getRGB() { return rgb; }
17.
};
18.
public static void main(String[] args) {
19.
// insert code here
20.
}
21.
}
Which code fragment, inserted at line 19, allows the Rainbow class to compile?
A. MyColor skyColor = BLUE;Given:
11.
class Mammal { }
12.
13.
class Raccoon extends Mammal {
14.
Mammal m = new Mammal();
15.
}
16.
17.
class BabyRaccoon extends Mammal { }
Which four statements are true? (Choose four.)
A. Raccoon is-a Mammal.Given:
10.
class Nav{
11.
public enum Direction { NORTH, SOUTH, EAST, WEST }
12.
}
13.
public class Sprite{
14.
// insert code here
15.
}
Which code, inserted at line 14, allows the Sprite class to compile?
A. Direction d = NORTH;Given:
1.
package test;
2.
3.
class Target {
4.
public String name = "hello";
5.
}
What can directly access and change the value of the variable name?
A. any classGiven:
12.
String csv = "Sue,5,true,3";
13.
Scanner scanner = new Scanner( csv );
14.
scanner.useDelimiter(",");
15.
int age = scanner.nextInt();
What is the result?
A. Compilation fails.Click the Exhibit button. What is the output of the program shown in the exhibit?

Given:
11.
public class Commander {
12.
public static void main(String[] args) {
13.
String myProp = /* insert code here */
14.
System.out.println(myProp);
15.
}
16.
}
and the command line: java -Dprop.custom=gobstopper Commander
Which two, placed on line 13, will produce the output gobstopper? (Choose two.)
A. System.load("prop.custom");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.