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

    Given:

    1. // insert code here

    12 private N min, max;

    13 public N getMin() { return min; }

    14 public N getMax() { return max; }

    15 public void add(N added) {

    16 if (min == null || added.doubleValue() < min.doubleValue()) 17 min = added;

    18 if (max == null || added.doubleValue() > max.doubleValue()) 19 max = added;

    20 }

    21 }

    Which two, inserted at line 11, will allow the code to compile? (Choose two.)

    A. public class MinMax {
    B. public class MinMax
    C. public class MinMax {
    D. public class MinMax {
    E. public class MinMax
    F. public class MinMax {

  • Question 52:

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

    Given:

    11.

    public class ItemTest {

    12.

    private final int id;

    13.

    public ItemTest(int id) { this.id = id; }

    14.

    public void updateId(int newId) { id = newId; } 15.

    16.

    public static void main(String[] args) {

    17.

    ItemTest fa = new ItemTest(42);

    18.

    fa.updateId(69);

    19.

    System.out.println(fa.id);

    20.

    }

    21.

    }

    What is the result?

    A. Compilation fails.
    B. An exception is thrown at runtime.
    C. The attribute id in the ItemTest object remains unchanged.
    D. The attribute id in the ItemTest object is modified to the new value.
    E. A new ItemTest object is created with the preferred value in the id attribute.

  • Question 54:

    DRAG DROP

    Select and Place:

  • Question 55:

    Given:

    1.

    public class Venus {

    2.

    public static void main(String[] args) {

    3.

    int [] x = {1,2,3};

    4.

    int y[] = {4,5,6};

    5.

    new Venus().go(x,y);

    6.

    }

    7.

    void go(int[]... z) {

    8.

    for(int[] a : z)

    9.

    System.out.print(a[0]);

    10.

    }

    11.

    }

    What is the result?

    A. 1
    B. 12
    C. 14
    D. 123
    E. Compilation fails.
    F. An exception is thrown at runtime.

  • Question 56:

    Which three statements are true? (Choose three.)

    A. A final method in class X can be abstract if and only if X is abstract.
    B. A protected method in class X can be overridden by any subclass of X.
    C. A private static method can be called only within other static methods in class X.
    D. A non-static public final method in class X can be overridden in any subclass of X.
    E. A public static method in class X can be called by a subclass of X without explicitly referencing the class X.
    F. A method with the same signature as a private final method in class X can be implemented in a subclass of X.
    G. A protected method in class X can be overridden by a subclass of X only if the subclass is in the same package as X.

  • Question 57:

    Given:

    11.

    class ClassA {}

    12.

    class ClassB extends ClassA {}

    13.

    class ClassC extends ClassA {} and:

    21.

    ClassA p0 = new ClassA();

    22. ClassB p1 = new ClassB();

    23. ClassC p2 = new ClassC();

    24. ClassA p3 = new ClassB();

    25. ClassA p4 = new ClassC();

    Which three are valid? (Choose three.)

    A. p0 = p1;
    B. p1 = p2;
    C. p2 = p4;
    D. p2 = (ClassC)p1;
    E. p1 = (ClassB)p3;
    F. p2 = (ClassC)p4;

  • Question 58:

    Given:

    12.

    import java.util.*;

    13.

    public class Explorer1 {

    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(609);

    21.

    System.out.println(s + " " + subs);

    22.

    }

    23.

    }

    What is the result?

    A. Compilation fails.
    B. An exception is thrown at runtime.
    C. [608, 609, 610, 612] [608, 610]
    D. [608, 609, 610, 612] [608, 609, 610]
    E. [606, 608, 609, 610, 612] [608, 610]
    F. [606, 608, 609, 610, 612] [608, 609, 610]

  • Question 59:

    Given a valid DateFormat object named df, and

    16.

    Date d = new Date(0L);

    17.

    String ds = "December 15, 2004";

    18.

    // insert code here

    What updates d's value with the date represented by ds?

    A. 18. d = df.parse(ds);
    B. 18. d = df.getDate(ds);
    C. 18. try { 19. d = df.parse(ds); 20. } catch(ParseException e) { };
    D. 18. try { 19. d = df.getDate(ds); 20. } catch(ParseException e) { };

  • Question 60:

    Given:

    3.

    interface Fish { }

    4.

    class Perch implements Fish { }

    5.

    class Walleye extends Perch { }

    6.

    class Bluegill { }

    7.

    public class Fisherman {

    8.

    public static void main(String[] args) {

    9.

    Fish f = new Walleye();

    10.

    Walleye w = new Walleye();

    11.

    Bluegill b = new Bluegill();

    12.

    if(f instanceof Perch) System.out.print("f-p ");

    13.

    if(w instanceof Fish) System.out.print("w-f ");

    14.

    if(b instanceof Fish) System.out.print("b-f ");

    15.

    }

    16.

    }

    What is the result?

    A. w-f
    B. f-p w-f
    C. w-f b-f
    D. f-p w-f b-f
    E. Compilation fails.
    F. An exception is thrown at runtime.

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.