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

    Given:

    1.

    public class TestOne {

    2.

    public static void main (String[] args) throws Exception {

    3.

    Thread.sleep(3000);

    4.

    System.out.println("sleep");

    5.

    }

    6.

    }

    What is the result?

    A. Compilation fails.
    B. An exception is thrown at runtime.
    C. The code executes normally and prints "sleep".
    D. The code executes normally, but nothing is printed.

  • Question 62:

    Given:

    1.

    class ClassA {

    2.

    public int numberOfInstances;

    3.

    protected ClassA(int numberOfInstances) {

    4.

    this.numberOfInstances = numberOfInstances;

    5.

    }

    6.

    }

    7.

    public class ExtendedA extends ClassA {

    8.

    private ExtendedA(int numberOfInstances) {

    9.

    super(numberOfInstances);

    10.

    }

    11.

    public static void main(String[] args) {

    12.

    ExtendedA ext = new ExtendedA(420);

    13.

    System.out.print(ext.numberOfInstances);

    14.

    }

    15.

    }

    Which statement is true?

    A. 420 is the output.
    B. An exception is thrown at runtime.
    C. All constructors must be declared public.
    D. Constructors CANNOT use the private modifier.
    E. Constructors CANNOT use the protected modifier.

  • Question 63:

    Given a method that must ensure that its parameter is not null:

    11.

    public void someMethod(Object value) {

    12.

    // check for null value ...

    20.

    System.out.println(value.getClass());

    21.

    }

    What, inserted at line 12, is the appropriate way to handle a null value?

    A. assert value == null;
    B. assert value != null, "value is null";
    C. if (value == null) { throw new AssertionException("value is null"); }
    D. if (value == null) { throw new IllegalArgumentException("value is null"); }

  • Question 64:

    DRAG DROP

    Select and Place:

  • Question 65:

    DRAG DROP

    Select and Place:

  • Question 66:

    Given:

    23.

    Object [] myObjects = {

    24.

    new Integer(12),

    25.

    new String("foo"),

    26.

    new Integer(5),

    27.

    new Boolean(true)

    28.

    };

    29.

    Arrays.sort(myObjects);

    30.

    for(int i=0; i

    31.

    System.out.print(myObjects[i].toString());

    32.

    System.out.print(" ");

    33.

    }

    What is the result?

    A. Compilation fails due to an error in line 23.
    B. Compilation fails due to an error in line 29.
    C. A ClassCastException occurs in line 29.
    D. A ClassCastException occurs in line 31.
    E. The value of all four objects prints in natural order.

  • Question 67:

    A developer is creating a class Book, that needs to access class Paper. The Paper class is deployed in a JAR named myLib.jar. Which three, taken independently, will allow the developer to use the Paper class while compiling the Book class? (Choose three.)

    A. The JAR file is located at $JAVA_HOME/jre/classes/myLib.jar.
    B. The JAR file is located at $JAVA_HOME/jre/lib/ext/myLib.jar..
    C. The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar/Paper.class.
    D. The JAR file is located at /foo/myLib.jar and a classpath environment variable is set that includes /foo/myLib.jar.
    E. The JAR file is located at /foo/myLib.jar and the Book class is compiled using javac 璫p /foo/myLib.jar/Paper Book.java.
    F. The JAR file is located at /foo/myLib.jar and the Book class is compiled using javac
    G. The JAR file is located at /foo/myLib.jar and the Book class is compiled using javac 璫lasspath /foo/myLib.jar Book.java

  • Question 68:

    Given:

    22.

    StringBuilder sb1 = new StringBuilder("123");

    23.

    String s1 = "123";

    24.

    // insert code here

    25.

    System.out.println(sb1 + " " + s1);

    Which code fragment, inserted at line 24, outputs "123abc 123abc"?

    A. sb1.append("abc"); s1.append("abc");
    B. sb1.append("abc"); s1.concat("abc");
    C. sb1.concat("abc"); s1.append("abc");
    D. sb1.concat("abc"); s1.concat("abc");
    E. sb1.append("abc"); s1 = s1.concat("abc");
    F. sb1.concat("abc"); s1 = s1.concat("abc");
    G. sb1.append("abc"); s1 = s1 + s1.concat("abc");
    H. sb1.concat("abc"); s1 = s1 + s1.concat("abc");

  • Question 69:

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

    Given:

    1.

    public class TestOne implements Runnable {

    2.

    public static void main (String[] args) throws Exception {

    3.

    Thread t = new Thread(new TestOne());

    4.

    t.start();

    5.

    System.out.print("Started");

    6.

    t.join();

    7.

    System.out.print("Complete");

    8.

    }

    9.

    public void run() {

    10.

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

    11.

    System.out.print(i);

    12.

    }

    13.

    }

    14.

    }

    What can be a result?

    A. Compilation fails.
    B. An exception is thrown at runtime.
    C. The code executes and prints "StartedComplete".
    D. The code executes and prints "StartedComplete0123".
    E. The code executes and prints "Started0123Complete".

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.