1Z0-850 Exam Details

  • Exam Code
    :1Z0-850
  • Exam Name
    :Java SE 5 and 6, Certified Associate
  • Certification
    :Oracle Certifications
  • Vendor
    :Oracle
  • Total Questions
    :242 Q&As
  • Last Updated
    :Dec 07, 2021

Oracle 1Z0-850 Online Questions & Answers

  • Question 21:

    Which two describe benefits of encapsulation? (Choose two.)

    A. Code is more flexible because the attributes can be modified directly from code in other packages.
    B. Code is more reusable because the attributes of the class are protected from direct modification by other code.
    C. Code is safer because attributes of the class CANNOT be directly modified by code outside the class.
    D. Code is more useful because attributes of the class can be accessed by other classes for both reading and writing.
    E. Code is more efficient because attributes of the class can be accessed directly by other classes, without the overhead of going through access methods.

  • Question 22:

    Which two are true about the composition relationship "A Blip consists of many Blipverts."? (Choose two.)

    A. When a Blipvert is deleted, its Blip should also be deleted.
    B. A Blipvert must be part of at least one Blip.
    C. A Blipvert can be a part of only one Blip.
    D. A Blip must have at least two Blipverts.
    E. When a Blip is deleted, each of its Blipverts should also be deleted.

  • Question 23:

    Given:

    1.

    class Test {

    2.

    public static void main(String args[]) {

    3.

    int num1 = 10, num2 = 20, result;

    4.

    result = calc(num1, num2);

    5.

    System.out.println(result);

    6.

    }

    7.

    8.

    // insert code here

    9.

    }

    Which, inserted at line 8, produces the output 30?

    A. static int calc(int n1, int n2) { return n1 + n2; }
    B. static void calc(n1, n2) { return (n1 + n2); }
    C. public int calc(int n1, int n2) { return; }
    D. static int calc(int n1, int n2) { return; }
    E. public int calc(int n1, int n2) { return n1 + n2; }
    F. static int calc(int n1, n2) { return n1, n2; };

  • Question 24:

    Click the Exhibit button. Which class correctly implements the interface Flyer?

    A. Penguin
    B. Helicopter
    C. Airplane
    D. Lark

  • Question 25:

    Given:

    3.

    interface Pet {

    4.

    void eat();

    5.

    }

    6.

    class Dog implements Pet { public void eat() { } }

    7.

    class Beagle extends Dog { public void eat() { } }

    Which demonstrates the "program to an interface" principle?

    A. class PetFood extends Pet {public void go(PetFood d) {
    B. eat();}
    C. class PetFood {public void go(Dog d) {
    D. eat();}
    E. class PetFood {public void go(Beagle b) {
    F. eat();}
    G. interface PetFood implements Pet {public void go(Pet d) {
    H. eat();}
    I. class PetFood {public void go(Pet p) {
    J. eat();}

  • Question 26:

    Click the Exhibit button.

    Which class has a superclass relationship?

    A. Z
    B. Y
    C. X
    D. W

  • Question 27:

    Which four are primitive data types? (Choose four.)

    A. Integer
    B. String
    C. short
    D. long
    E. null
    F. int
    G. char

  • Question 28:

    You need an algorithm that must:

    .Iterate through an array of primitive integers .Print the value of each array element in index order If the value of the element is equal to 10, print the value of the element, and then terminate the iteration

    Which method correctly implements the algorithm?

    A. public static void foo(int[] list) {for(int i:list) {System.out.println(i);if (i==10) break;}
    B. public static void foo(int[] list) {while(list.length > 0) {System.out.println(i);if (i==10) break;}
    C. public static void foo(int[] list) {for(int i=0; i < list.length; i++) {System.out.println(i);if (i==10) break;}
    D. public static void foo(int[] list) {for(int i=0; i < list.length; i++) {System.out.println(i);if (i==10) continue;}
    E. public static void foo(int[] list) {for each(int i in list) {System.out.println(i);if (i==10) terminate;}

  • Question 29:

    Given:

    11.

    class A {

    12.

    public void methodX(int i) { /* some code */ }

    13.

    public String methodY(String s) { /* some code */ }

    14.

    }

    15.

    class B extends A {

    16.

    public void methodX(int i) { /* some code */ }

    17.

    public String methodX(String s) { /* some code */ }

    18.

    public String methodY(String s) { /* some code */ }

    19.

    }

    Which two are true? (Choose two.)

    A. The methodY(String) in class B overrides methodY(String) in class A.
    B. The methodY(String) in class B overloads methodY(String) in class A.
    C. The methodX(String) in class B overrides methodX(int) in class A.
    D. The methodX(int) in class B overrides methodX(int) in class A.
    E. The methodX(int) in class A overloads methodX(String) in class B.

  • Question 30:

    Given:

    1.

    // insert code here

    2.

    void play();

    3.

    void stop();

    4.

    }

    5.

    // insert code here

    6.

    public void play() { }

    7.

    public void stop() { }

    8.

    }

    Which, inserted at lines 1 and 5, allows the code to compile?

    A. 1. interface Player {5. class DVDPlayer implements Player {
    B. 1. implements Player {5. class DVDPlayer interface Player {
    C. 1. abstract class Player {5. class DVDPlayer extends Player {
    D. 1. interface Player {5. class DVDPlayer extends Player {
    E. 1. class Player {5. interface DVDPlayer implements Player {

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-850 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.