Click the Exhibit button. What two must the programmer do to correct the compilation errors? (Choose two.)

Given:
1.
public class Plant {
2.
private String name;
3.
public Plant(String name) { this.name = name; }
4.
public String getName() { return name; }
5.
}
1.
public class Tree extends Plant {
2.
public void growFruit() { }
3.
public void dropLeaves() { }
4.
}
Which statement is true?
A. The code will compile without changes.Given:
1.
class Alligator {
2.
public static void main(String[] args) {
3.
int []x[] = {{1,2}, {3,4,5}, {6,7,8,9}};
4.
int [][]y = x;
5.
System.out.println(y[2][1]);
6.
}
7.
}
What is the result?
A. 2Given:
11.
public void testIfA() {
12.
if (testIfB("True")) {
13.
System.out.println("True");
14.
} else {
15.
System.out.println("Not true");
16.
}
17.
}
18.
public Boolean testIfB(String str) {
19.
return Boolean.valueOf(str);
20.
}
What is the result when method testIfA is invoked?
A. TrueDRAG DROP
Select and Place:

A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where the old one is installed. Bob is currently able to run a Java chess program starting from his home directory /home/bob using the command: java - classpath /test:/home/bob/downloads/*.jar games.Chess Bob's CLASSPATH is set (at login time) to:
/usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/*.jar
What is a possible location for the Chess.class file?
A. /test/Chess.classGiven:
11.
abstract class Vehicle { public int speed() { return 0; }
12.
class Car extends Vehicle { public int speed() { return 60; }
13.
class RaceCar extends Car { public int speed() { return 150; } ...
21.
RaceCar racer = new RaceCar();
22.
Car car = new RaceCar();
23.
Vehicle vehicle = new RaceCar();
24.
System.out.println(racer.speed() + ", " + car.speed()
25.
+ ", " + vehicle.speed());
What is the result?
A. 0, 0, 0Given:
10 class Line {
11 public class Point { public int x,y;}
12 public Point getPoint() { return new Point(); } 13 }
14 class Triangle {
15 public Triangle() {
16 // insert code here
17 }
18 }
Which code, inserted at line 16, correctly retrieves a local instance of a Point object?
A. Point p = Line.getPoint();Given:
12 import java.util.*;
13 public class Explorer2 {
14 public static void main(String[] args) {
15 TreeSet
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:
2.
public class Hi {
3.
void m1() { }
4.
protected void() m2 { }
5.
}
6.
class Lois extends Hi {
7.
// insert code here
8.
}
Which four code fragments, inserted independently at line 7, will compile? (Choose four.)
A. public void m1() { }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.