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

    Given:

    1.

    public class Threads5 {

    2.

    public static void main (String[] args) {

    3.

    new Thread(new Runnable() {

    4.

    public void run() {

    5.

    System.out.print("bar");

    6.

    }}).start();

    7.

    }

    8.

    }

    What is the result?

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

  • Question 232:

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

    DRAG DROP

    Select and Place:

  • Question 234:

    Given:

    11.

    public void testIfA() {

    12.

    if (testIfB("True")) {

    13.

    System.out.println("True");

    14.

    } else {

    15.

    System.out.println("Not true");

    16.

    }

    17.

    }

    18.

    public Boolean testIfB(String str) {

    19.

    return Boolean.valueOf(str);

    20.

    }

    What is the result when method testIfA is invoked?

    A. True
    B. Not true
    C. An exception is thrown at runtime.
    D. Compilation fails because of an error at line 12.
    E. Compilation fails because of an error at line 19.

  • Question 235:

    Click the Exhibit button. Which three code fragments, added individually at line 29, produce the output 100? (Choose three.)

    A. n = 100;
    B. i.setX( 100 );
    C. o.getY().setX( 100 );
    D. i = new Inner(); i.setX( 100 );
    E. o.setY( i ); i = new Inner(); i.setX( 100 );
    F. i = new Inner(); i.setX( 100 ); o.setY( i );

  • Question 236:

    Given:

    10.

    abstract public class Employee {

    11.

    protected abstract double getSalesAmount();

    12.

    public double getCommision() {

    13.

    return getSalesAmount() * 0.15;

    14.

    }

    15.

    }

    16.

    class Sales extends Employee {

    17.

    // insert method here

    18.

    }

    Which two methods, inserted independently at line 17, correctly complete the Sales class? (Choose two.)

    A. double getSalesAmount() { return 1230.45; }
    B. public double getSalesAmount() { return 1230.45; }
    C. private double getSalesAmount() { return 1230.45; }
    D. protected double getSalesAmount() { return 1230.45; }

  • Question 237:

    Click the Exhibit button. Given:

    31.

    public void method() {

    32.

    A a = new A();

    33.

    a.method1();

    34.

    }

    Which statement is true if a TestException is thrown on line 3 of class B?

    A. Line 33 must be called within a try block.
    B. The exception thrown by method1 in class A is not required to be caught.
    C. The method declared on line 31 must be declared to throw a RuntimeException.
    D. On line 5 of class A, the call to method2 of class B does not need to be placed in a try/catch block.

  • Question 238:

    DRAG DROP

    Select and Place:

  • Question 239:

    Click the Exhibit button. What is the result?

    A. go in Goban go in Sente
    B. go in Sente go in Goban C. go in Sente go in Goban
    C. go in Goban go in Sente
    D. Compilation fails because of an error in line 17.

  • Question 240:

    Given:

    11.

    public static void main(String[] args) {

    12.

    String str = "null";

    13.

    if (str == null) {

    14.

    System.out.println("null");

    15.

    } else (str.length() == 0) {

    16.

    System.out.println("zero");

    17.

    } else {

    18.

    System.out.println("some");

    19.

    }

    20.

    }

    What is the result?

    A. null
    B. zero
    C. some
    D. Compilation fails.
    E. 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.