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

    DRAG DROP

    Select and Place:

  • Question 182:

    Given classes defined in two different files:

    1.

    package util;

    2.

    public class BitUtils {

    3.

    private static void process(byte[] b) {}

    4.

    }

    1. package app; 2 . public class SomeApp {

    3.

    public static void main(String[] args) {

    4.

    byte[] bytes = new byte[256];

    5.

    // insert code here

    6.

    }

    7.

    }

    What is required at line 5 in class SomeApp to use the process method of BitUtils?

    A. process(bytes);
    B. BitUtils.process(bytes);
    C. app.BitUtils.process(bytes);
    D. util.BitUtils.process(bytes);
    E. import util.BitUtils.*; process(bytes);
    F. SomeApp cannot use the process method in BitUtils.

  • Question 183:

    Given:

    11.

    public static Collection get() {

    12.

    Collection sorted = new LinkedList();

    13.

    sorted.add("B"); sorted.add("C"); sorted.add("A");

    14.

    return sorted;

    15.

    }

    16.

    public static void main(String[] args) {

    17.

    for (Object obj: get()) {

    18.

    System.out.print(obj + ", ");

    19.

    }

    20.

    }

    What is the result?

    A. A, B, C,
    B. B, C, A,
    C. Compilation fails.
    D. The code runs with no output.
    E. An exception is thrown at runtime.

  • Question 184:

    Given:

    11.

    String test = "a1b2c3";

    12.

    String[] tokens = test.split("\\d");

    13.

    for(String s: tokens) System.out.print(s + " ");

    What is the result?

    A. a b c
    B. 1 2 3
    C. a1b2c3
    D. a1 b2 c3
    E. Compilation fails.
    F. The code runs with no output.
    G. An exception is thrown at runtime.

  • Question 185:

    Given:

    3.

    class Employee {

    4.

    String name; double baseSalary;

    5.

    Employee(String name, double baseSalary) {

    6.

    this.name = name;

    7.

    this.baseSalary = baseSalary;

    8.

    }

    9.

    }

    10.

    public class SalesPerson extends Employee {

    11.

    double commission;

    12.

    public SalesPerson(String name, double baseSalary, double commission) {

    13.

    // insert code here

    14.

    }

    15.

    }

    Which two code fragments, inserted independently at line 13, will compile? (Choose two.)

    A. super(name, baseSalary);
    B. this.commission = commission;
    C. super(); this.commission = commission;
    D. this.commission = commission; super();
    E. super(name, baseSalary); this.commission = commission;
    F. this.commission = commission; super(name, baseSalary);
    G. super(name, baseSalary, commission);

  • Question 186:

    Given that:

    Gadget has-a Sprocket and Gadget has-a Spring and Gadget is-a Widget and Widget has-a Sprocket

    Which two code fragments represent these relationships? (Choose two.)

    A. class Widget { Sprocket s; } class Gadget extends Widget { Spring s; }
    B. class Widget { } class Gadget extends Widget { Spring s1; Sprocket s2; }
    C. class Widget { Sprocket s1; Spring s2; } class Gadget extends Widget { }
    D. class Gadget { Spring s; } class Widget extends Gadget{ Sprocket s; }
    E. class Gadget { } class Widget extends Gadget{ Sprocket s1; Spring s2; }
    F. class Gadget { Spring s1; Sprocket s2; } class Widget extends Gadget{ }

  • Question 187:

    Given:

    5.

    class Payload {

    6.

    private int weight;

    7.

    public Payload (int w) { weight = w; }

    8.

    public void setWeight(int w) { weight = w; }

    9. public String toString() { return Integer.toString(weight); }

    10. }

    11. public class TestPayload {

    12. static void changePayload(Payload p) { /* insert code */ }

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

    14. Payload p = new Payload(200);

    15. p.setWeight(1024);

    16. changePayload(p);

    17. System.out.println("p is " + p);

    18. } }

    Which code fragment, inserted at the end of line 12, produces the output p is 420?

    A. p.setWeight(420);
    B. p.changePayload(420);
    C. p = new Payload(420);
    D. Payload.setWeight(420);
    E. p = Payload.setWeight(420);

  • Question 188:

    A team of programmers is reviewing a proposed API for a new utility class. After some discussion, they realize that they can reduce the number of methods in the API without losing any functionality. If they implement the new design, which two OO principles will they be promoting?

    A. Looser coupling
    B. Tighter coupling
    C. Lower cohesion
    D. Higher cohesion
    E. Weaker encapsulation
    F. Stronger encapsulation

  • Question 189:

    DRAG DROP

    Select and Place:

  • Question 190:

    Click the Exhibit button. Given:

    25.

    A a = new A();

    26.

    System.out.println(a.doit(4, 5)); What is the result?

    A. Line 26 prints "a" to System.out.
    B. Line 26 prints "b" to System.out.
    C. An exception is thrown at line 26 at runtime.
    D. Compilation of class A will fail due to an error in line 6.

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.