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 91:

    Given:

    1.

    interface TestA { String toString(); }

    2.

    public class Test {

    3.

    public static void main(String[] args) {

    4.

    System.out.println(new TestA() {

    5.

    public String toString() { return "test"; }

    6.

    });

    7.

    }

    8.

    }

    What is the result?

    A. test
    B. null
    C. An exception is thrown at runtime.
    D. Compilation fails because of an error in line 1.
    E. Compilation fails because of an error in line 4.
    F. Compilation fails because of an error in line 5.

  • Question 92:

    Given:

    1.

    public class Blip {

    2.

    protected int blipvert(int x) { return 0; }

    3.

    }

    4.

    class Vert extends Blip {

    5.

    // insert code here

    6.

    }

    Which five methods, inserted independently at line 5, will compile? (Choose five.)

    A. public int blipvert(int x) { return 0; }
    B. private int blipvert(int x) { return 0; }
    C. private int blipvert(long x) { return 0; }
    D. protected long blipvert(int x) { return 0; }
    E. protected int blipvert(long x) { return 0; }
    F. protected long blipvert(long x) { return 0; }
    G. protected long blipvert(int x, int y) { return 0; }

  • Question 93:

    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 pq = new 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 pear
    B. banana pear
    C. apple apple
    D. apple banana
    E. banana banana

  • Question 94:

    Given:

    11.

    public static void main(String[] args) {

    12.

    for (int i = 0; i <= 10; i++) {

    13.

    if (i > 6) break;

    14.

    }

    15.

    System.out.println(i);

    16.

    }

    What is the result?

    A. 6
    B. 7
    C. 10
    D. 11 E. Compilation fails.
    F. An exception is thrown at runtime.

  • Question 95:

    Given:

    11.

    public class Test {

    12.

    public static void main(String [] args) {

    13.

    int x = 5;

    14.

    boolean b1 = true;

    15.

    boolean b2 = false;

    16.

    17.

    if ((x == 4) andand !b2 )

    18.

    System.out.print("1 ");

    19.

    System.out.print("2 ");

    20.

    if ((b2 = true) andand b1 )

    21.

    System.out.print("3 ");

    22.

    }

    23.

    }

    What is the result?

    A. 2
    B. 3
    C. 1 2
    D. 2 3
    E. 1 2 3
    F. Compilation fails.
    G. An exception is thrown at runtime.

  • Question 96:

    Given:

    11. class Snoochy {

    12. Boochy booch;

    13. public Snoochy() { booch = new Boochy(this); }

    14. }

    15.

    16. class Boochy {

    17. Snoochy snooch;

    18. public Boochy(Snoochy s) { snooch = s; }

    19. } And the statements:

    21. public static void main(String[] args) {

    22. Snoochy snoog = new Snoochy();

    23. snoog = null;

    24. // more code here

    25. }

    Which statement is true about the objects referenced by snoog, snooch, and booch immediately after line 23 executes?

    A. None of these objects are eligible for garbage collection.
    B. Only the object referenced by booch is eligible for garbage collection.
    C. Only the object referenced by snoog is eligible for garbage collection.
    D. Only the object referenced by snooch is eligible for garbage collection.
    E. The objects referenced by snooch and booch are eligible for garbage collection.

  • Question 97:

    Given:

    11.

    static void test() {

    12.

    try {

    13.

    String x = null;

    14.

    System.out.print(x.toString() + " ");

    15.

    }

    16.

    finally { System.out.print("finally "); }

    17.

    }

    18.

    public static void main(String[] args) {

    19.

    try { test(); }

    20.

    catch (Exception ex) { System.out.print("exception "); }

    21.

    }

    What is the result?

    A. null
    B. finally
    C. null finally
    D. Compilation fails.
    E. finally exception

  • Question 98:

    Click the Exhibit button. What is the result?

    A. 4321
    B. 0000
    C. An exception is thrown at runtime.
    D. Compilation fails because of an error in line 18.

  • Question 99:

    A team of programmers is involved in reviewing a proposed design for a new utility class. After some discussion, they realize that the current design allows other classes to access methods in the utility class that should be accessible only to methods within the utility class itself. What design issue has the team discovered?

    A. Tight coupling
    B. Low cohesion
    C. High cohesion
    D. Loose coupling
    E. Weak encapsulation
    F. Strong encapsulation

  • Question 100:

    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.

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.