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

    Given:

    1.

    public class Boxer1{

    2.

    Integer i;

    3.

    int x;

    4.

    public Boxer1(int y) {

    5.

    x = i+y;

    6.

    System.out.println(x);

    7.

    }

    8.

    public static void main(String[] args) {

    9.

    new Boxer1(new Integer(4));

    10.

    }

    11.

    }

    What is the result?

    A. The value "4" is printed at the command line.
    B. Compilation fails because of an error in line 5.
    C. Compilation fails because of an error in line 9.
    D. A NullPointerException occurs at runtime.
    E. A NumberFormatException occurs at runtime.
    F. An IllegalStateException occurs at runtime.

  • Question 22:

    Given:

    3.

    public class Spock {

    4.

    public static void main(String[] args) {

    5.

    Long tail = 2000L;

    6.

    Long distance = 1999L;

    7.

    Long story = 1000L;

    8.

    if((tail > distance) ^ ((story * 2) == tail))

    9.

    System.out.print("1");

    10.

    if((distance + 1 != tail) ^ ((story * 2) == distance))

    11.

    System.out.print("2");

    12.

    }

    13.

    }

    What is the result?

    A. 1
    B. 2
    C. 12
    D. Compilation fails.
    E. No output is produced.
    F. An exception is thrown at runtime.

  • Question 23:

    Select and Place:

  • Question 24:

    Given:

    1.

    public class Mule {

    2.

    public static void main(String[] args) {

    3.

    boolean assert = true;

    4.

    if(assert) {

    5.

    System.out.println("assert is true");

    6.

    }

    7.

    }

    8.

    }

    Which command-line invocations will compile?

    A. javac Mule.java
    B. javac -source 1.3 Mule.java
    C. javac -source 1.4 Mule.java
    D. javac -source 1.5 Mule.java

  • Question 25:

    Given:

    1. package com.company.application;

    2.

    3. public class MainClass {

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

    5. } And MainClass exists in the /apps/com/company/application directory. Assume the CLASSPATH environment variable is set to "." (current directory).

    Which two java commands entered at the command line will run MainClass? (Choose two.)

    A. java MainClass if run from the /apps directory
    B. java com.company.application.MainClass if run from the /apps directory
    C. java -classpath /apps com.company.application.MainClass if run from any directory
    D. java -classpath . MainClass if run from the /apps/com/company/application directory
    E. java -classpath /apps/com/company/application:. MainClass if run from the /apps directory
    F. java com.company.application.MainClass if run from the /apps/com/company/application directory

  • Question 26:

    Given:

    11.

    static class A {

    12.

    void process() throws Exception { throw new Exception(); }

    13.

    }

    14.

    static class B extends A {

    15.

    void process() { System.out.println("B"); }

    16.

    }

    17.

    public static void main(String[] args) {

    18.

    new B().process();

    19.

    }

    What is the result?

    A. B
    B. The code runs with no output.
    C. Compilation fails because of an error in line 12.
    D. Compilation fails because of an error in line 15.
    E. Compilation fails because of an error in line 18.

  • Question 27:

    Given:

    11.

    public abstract class Shape {

    12.

    private int x;

    13.

    private int y;

    14.

    public abstract void draw();

    15.

    public void setAnchor(int x, int y) {

    16.

    this.x = x;

    17.

    this.y = y;

    18.

    }

    19.

    }

    Which two classes use the Shape class correctly? (Choose two.)

    A. public class Circle implements Shape { private int radius; }
    B. public abstract class Circle extends Shape { private int radius; }
    C. public class Circle extends Shape { private int radius; public void draw(); }
    D. public abstract class Circle implements Shape { private int radius; public void draw(); }
    E. public class Circle extends Shape { private int radius; public void draw() {/* code here */}
    F. public abstract class Circle implements Shape { private int radius; public void draw() { /* code here */ }

  • Question 28:

    Click the Exhibit button. Given the fully-qualified class names: com.foo.bar.Dog com.foo.bar.blatz.Book com.bar.Car com.bar.blatz.Sun Which graph represents the correct directory structure for a JAR file from which those classes can be used by the compiler and JVM?

    A. Jar A
    B. Jar B
    C. Jar C
    D. Jar D
    E. Jar E

  • Question 29:

    A programmer has an algorithm that requires a java.util.List that provides an efficient implementation of add(0, object), but does NOT need to support quick random access. What supports these requirements?

    A. java.util.Queue
    B. java.util.ArrayList
    C. java.util.LinearList
    D. java.util.LinkedList

  • Question 30:

    Given:

    10.

    class One {

    11.

    public One foo() { return this; }

    12.

    }

    13.

    class Two extends One {

    14.

    public One foo() { return this; }

    15.

    }

    16.

    class Three extends Two {

    17.

    // insert method here

    18.

    }

    Which two methods, inserted individually, correctly complete the Three class? (Choose two.)

    A. public void foo() {}
    B. public int foo() { return 3; }
    C. public Two foo() { return this; }
    D. public One foo() { return this; }
    E. public Object foo() { return this; }

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.