1Z0-851 Exam Details

  • Exam Code
    :1Z0-851
  • Exam Name
    :Oracle Solaris 11 System Administration
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :290 Q&As
  • Last Updated
    :Dec 10, 2021

Oracle 1Z0-851 Online Questions & Answers

  • Question 31:

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

    A. insert a call to this() in the Car constructor
    B. insert a call to this() in the MeGo constructor
    C. insert a call to super() in the MeGo constructor
    D. insert a call to super(vin) in the MeGo constructor
    E. change the wheelCount variable in Car to protected
    F. change line 3 in the MeGo class to super.wheelCount = 3;

  • Question 32:

    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.
    B. The code will compile if public Tree() { Plant(); } is added to the Tree class.
    C. The code will compile if public Plant() { Tree(); } is added to the Plant class.
    D. The code will compile if public Plant() { this("fern"); } is added to the Plant class.
    E. The code will compile if public Plant() { Plant("fern"); } is added to the Plant class.

  • Question 33:

    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. 2
    B. 3
    C. 4
    D. 6
    E. 7
    F. Compilation fails.

  • Question 34:

    Given:

    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. True
    B. Not true
    C. An exception is thrown at runtime.
    D. Compilation fails because of an error at line 12.
    E. Compilation fails because of an error at line 19.

  • Question 35:

    DRAG DROP

    Select and Place:

  • Question 36:

    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.class
    B. /home/bob/Chess.class
    C. /test/games/Chess.class
    D. /usr/lib/games/Chess.class
    E. /home/bob/games/Chess.class
    F. inside jarfile /opt/java/lib/Games.jar (with a correct manifest)
    G. inside jarfile /home/bob/downloads/Games.jar (with a correct manifest)

  • Question 37:

    Given:

    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, 0
    B. 150, 60, 0
    C. Compilation fails.
    D. 150, 150, 150
    E. An exception is thrown at runtime.

  • Question 38:

    Given:

    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();
    B. Line.Point p = Line.getPoint();
    C. Point p = (new Line()).getPoint();
    D. Line.Point p = (new Line()).getPoint();

  • Question 39:

    Given:

    12 import java.util.*;

    13 public class Explorer2 {

    14 public static void main(String[] args) {

    15 TreeSet s = new TreeSet(); 16 TreeSet subs = new 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.
    B. An exception is thrown at runtime.
    C. [608, 610, 612, 629] [608, 610]
    D. [608, 610, 612, 629] [608, 610, 629]
    E. [606, 608, 610, 612, 629] [608, 610]
    F. [606, 608, 610, 612, 629] [608, 610, 629]

  • Question 40:

    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() { }
    B. protected void m1() { }
    C. private void m1() { }
    D. void m2() { }
    E. public void m2() { }
    F. protected void m2() { }
    G. private void m2() { }

Tips on How to Prepare for the Exams

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.