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

    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;
    B. Change line 2 to: protected int a;
    C. Change line 13 to: public Sub() { this(5); }
    D. Change line 13 to: public Sub() { super(5); }
    E. Change line 13 to: public Sub() { super(a); }

  • Question 222:

    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. Hello
    B. Hello World
    C. Compilation fails.
    D. Hello World 5
    E. The code runs with no output.
    F. An exception is thrown at runtime.

  • Question 223:

    DRAG DROP

    Select and Place:

  • Question 224:

    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;
    B. MyColor treeColor = MyColor.GREEN;
    C. if(RED.getRGB() < BLUE.getRGB()) { }
    D. Compilation fails due to other error(s) in the code.
    E. MyColor purple = new MyColor(0xff00ff);
    F. MyColor purple = MyColor.BLUE + MyColor.RED;

  • Question 225:

    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.
    B. Raccoon has-a Mammal.
    C. BabyRaccoon is-a Mammal.
    D. BabyRaccoon is-a Raccoon.
    E. BabyRaccoon has-a Mammal.
    F. BabyRaccoon is-a BabyRaccoon.

  • Question 226:

    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;
    B. Nav.Direction d = NORTH;
    C. Direction d = Direction.NORTH;
    D. Nav.Direction d = Nav.Direction.NORTH;

  • Question 227:

    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 class
    B. only the Target class
    C. any class in the test package
    D. any class that extends Target

  • Question 228:

    Given:

    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.
    B. After line 15, the value of age is 5.
    C. After line 15, the value of age is 3.
    D. An exception is thrown at runtime.

  • Question 229:

    Click the Exhibit button. What is the output of the program shown in the exhibit?

    A. 300-100-100-100-100
    B. 300-300-100-100-100
    C. 300-300-300-100-100
    D. 300-300-300-300-100

  • Question 230:

    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");
    B. System.getenv("prop.custom");
    C. System.property("prop.custom");
    D. System.getProperty("prop.custom");
    E. System.getProperties().getProperty("prop.custom");

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.