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

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

    Which Man class properly represents the relationship "Man has a best friend who is a Dog"?

    A. class Man extends Dog { }
    B. class Man implements Dog { }
    C. class Man { private BestFriend dog; }
    D. class Man { private Dog bestFriend; }
    E. class Man { private Dog; }
    F. class Man { private BestFriend; }

  • Question 133:

    Given:

    11.

    public static void main(String[] args) {

    12.

    try {

    13.

    args = null;

    14.

    args[0] = "test";

    15.

    System.out.println(args[0]);

    16.

    } catch (Exception ex) {

    17.

    System.out.println("Exception");

    18.

    } catch (NullPointerException npe) {

    19.

    System.out.println("NullPointerException");

    20.

    }

    21.

    }

    What is the result?

    A. test
    B. Exception
    C. Compilation fails.
    D. NullPointerException

  • Question 134:

    A company that makes Computer Assisted Design (CAD) software has, within its application, some utility classes that are used to perform 3D rendering tasks. The company's chief scientist has just improved the performance of one of the utility classes' key rendering algorithms, and has assigned a programmer to replace the old algorithm with the new algorithm. When the programmer begins researching the utility classes, she is happy to discover that the algorithm to be replaced exists in only one class. The programmer reviews that class's API, and replaces the old algorithm with the new algorithm, being careful that her changes adhere strictly to the class's API. Once testing has begun, the programmer discovers that other classes that use the class she changed are no longer working properly. What design flaw is most likely the cause of these new bugs?

    A. Inheritance
    B. Tight coupling
    C. Low cohesion
    D. High cohesion
    E. Loose coupling
    F. Object immutability

  • Question 135:

    Given:

    3.

    import java.util.*;

    4.

    public class Mapit {

    5.

    public static void main(String[] args) {

    6.

    Set set = new HashSet();

    7.

    Integer i1 = 45;

    8.

    Integer i2 = 46;

    9.

    set.add(i1);

    10.

    set.add(i1);

    11.

    set.add(i2); System.out.print(set.size() + " ");

    12.

    set.remove(i1); System.out.print(set.size() + " ");

    13.

    i2 = 47;

    14.

    set.remove(i2); System.out.print(set.size() + " ");

    15.

    }

    16.

    }

    What is the result?

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

  • Question 136:

    Given:

    1.

    public class GC {

    2.

    private Object o;

    3.

    private void doSomethingElse(Object obj) { o = obj; }

    4.

    public void doSomething() {

    5.

    Object o = new Object();

    6.

    doSomethingElse(o);

    7.

    o = new Object();

    8.

    doSomethingElse(null);

    9.

    o = null;

    10.

    }

    11.

    }

    When the doSomething method is called, after which line does the Object created in line 5 become available for garbage collection?

    A. Line 5
    B. Line 6
    C. Line 7
    D. Line 8
    E. Line 9
    F. Line 10

  • Question 137:

    Given:

    11. class X { public void foo() { System.out.print("X "); } } 12.

    13.

    public class SubB extends X {

    14.

    public void foo() throws RuntimeException {

    15.

    super.foo();

    16.

    if (true) throw new RuntimeException();

    17.

    System.out.print("B ");

    18.

    }

    19.

    public static void main(String[] args) {

    20.

    new SubB().foo();

    21.

    }

    22.

    }

    What is the result?

    A. X, followed by an Exception.
    B. No output, and an Exception is thrown.
    C. Compilation fails due to an error on line 14.
    D. Compilation fails due to an error on line 16.
    E. Compilation fails due to an error on line 17.
    F. X, followed by an Exception, followed by B.

  • Question 138:

    A UNIX user named Bob wants to replace his chess program with a new one, but he is not sure where the old one is installed. Bob is currently able to run a Java chess program starting from his home directory /home/bob using the command: java - classpath /test:/home/bob/downloads/*.jar games.Chess Bob's CLASSPATH is set (at login time) to:

    /usr/lib:/home/bob/classes:/opt/java/lib:/opt/java/lib/*.jar

    What is a possible location for the Chess.class file?

    A. /test/Chess.class
    B. /home/bob/Chess.class
    C. /test/games/Chess.class
    D. /usr/lib/games/Chess.class
    E. /home/bob/games/Chess.class
    F. inside jarfile /opt/java/lib/Games.jar (with a correct manifest)
    G. inside jarfile /home/bob/downloads/Games.jar (with a correct manifest)

  • Question 139:

    Given:

    1. public class Threads2 implements Runnable { 2.

    3.

    public void run() {

    4.

    System.out.println("run.");

    5.

    throw new RuntimeException("Problem");

    6.

    }

    7.

    public static void main(String[] args) {

    8.

    Thread t = new Thread(new Threads2());

    9.

    t.start();

    10.

    System.out.println("End of method.");

    11.

    }

    12.

    }

    Which two can be results? (Choose two.)

    A. java.lang.RuntimeException: Problem
    B. run. java.lang.RuntimeException: Problem
    C. End of method. java.lang.RuntimeException: Problem
    D. End of method. run. java.lang.RuntimeException: Problem
    E. run. java.lang.RuntimeException: Problem End of method.

  • Question 140:

    Given:

    13.

    public class Pass {

    14.

    public static void main(String [] args) {

    15.

    int x = 5;

    16.

    Pass p = new Pass();

    17.

    p.doStuff(x);

    18.

    System.out.print(" main x = " + x);

    19.

    }

    20.

    21.

    void doStuff(int x) {

    22.

    System.out.print(" doStuff x = " + x++);

    23.

    }

    24.

    }

    What is the result?

    A. Compilation fails.
    B. An exception is thrown at runtime.
    C. doStuff x = 6 main x = 6
    D. doStuff x = 5 main x = 5
    E. doStuff x = 5 main x = 6
    F. doStuff x = 6 main x = 5

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.