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

    Given:

    1.

    class Test {

    2.

    public static void main(String args[]) {

    3.

    String str = "Hello!";

    4.

    String str2 = "Bye!";

    5.

    str += str2;

    6.

    str -= str2;

    7.

    8.

    if ( str == str2 ) {

    9.

    System.out.println("str = str2");

    10.

    } else {

    11.

    System.out.println("str != str2");

    12.

    }

    13.

    }

    14.

    }

    What is the result?

    A. The code runs with no output.
    B. Compilation fails.
    C. str != str2
    D. str = str2

  • Question 12:

    Given:

    1.

    interface Movable {

    2.

    void move();

    3.

    void stop();

    4.

    }

    Which is valid?

    A. public class Bicycle implements Movable {public void move() { /*...*/ }public void stop() { /*...*/ }
    B. public class Bicycle implements Movable {void move() { /*...*/ }void stop() { /*...*/ }
    C. public class Bicycle extends Movable {public void move() { /*...*/ }public void stop() { /*...*/ }
    D. public class Bicycle implements Movable {public void move() { /*...*/ }

  • Question 13:

    Given:

    4.

    class Example {

    5.

    int x = 50;

    6.

    int y = 100;

    7.

    public static void main(String args[]) {

    8.

    int x = 0, y = 10;

    9.

    Example ex = new Example();

    10.

    while (x < 3) {

    11.

    x++; y--;

    12.

    }

    13.

    System.out.println("x = " + x + " , y = " + y);

    14.

    }

    15.

    }

    What is the result?

    A. Compilation fails because of an error at line 10.
    B. Compilation fails because of an error at line 8.
    C. x = 53 , y = 97
    D. Compilation fails because of an error at line 9.
    E. Compilation fails because of an error at line 11.
    F. x = 3 , y = 7

  • Question 14:

    Given:

    1.

    interface Pet { }

    2.

    class Dog implements Pet { }

    3.

    class Beagle extends Dog { }

    Which three are valid? (Choose three.)

    A. Pet a = new Dog();
    B. Dog d = new Beagle();
    C. Dog f = new Pet();
    D. Beagle c = new Dog();
    E. Pet e = new Beagle();
    F. Pet b = new Pet();

  • Question 15:

    Which two are features of JNDI? (Choose two.)

    A. an interface to store and retrieve named Java objects of any type
    B. an interface to search for objects using attributes
    C. a defined common set of messaging concepts and programming strategies
    D. connectivity to databases and other tabular data sources

  • Question 16:

    A business-tier service is being developed that will provide credit card validation. The service is not associated with a specific client, but is available to all clients. The service also has to be as efficient as possible. Which J2EE component matches these needs?

    A. entity bean
    B. stateful session bean
    C. stateless session bean
    D. servlet
    E. JNDI

  • Question 17:

    Which two are associated with the business tier in a J2EE web-based application? (Choose two.)

    A. stateless session beans
    B. servlets
    C. JSP
    D. HTML
    E. entity beans

  • Question 18:

    Which two compile without error? (Choose two.)

    A. char c = '\u0078';
    B. float f = 3.14;
    C. boolean b = 0;
    D. double d = 1000;

  • Question 19:

    Given:

    1.

    public enum Color { RED, YELLOW, GREEN }

    2.

    enum Fruit {

    3.

    Banana(Color.RED),

    4.

    Apple(Color.YELLOW),

    5.

    Kiwi(Color.GREEN);

    6.

    private Color color;

    7.

    Fruit(Color color) {

    8.

    this.color = color;

    9.

    }

    10.

    }

    11.

    class Test {

    12.

    public void method() {

    13.

    // insert code here

    14.

    }

    15.

    }

    Which two, inserted independently at line 13, allow the code to compile? (Choose two.)

    A. Color red = Color.values[0];
    B. Fruit f = Banana;
    C. Fruit[] fruits = Fruit.values();
    D. Fruit f = new Fruit(Color.RED);
    E. Fruit f = Fruit.Banana; switch (f) { }

  • Question 20:

    Click the Exhibit button.

    Which relationships, referenced by the class names involved, are drawn using valid UML notation?

    A. AB, AC, BD, and CD
    B. only AC, BD, and CD
    C. only AB, AC, and BD
    D. only AB and AC
    E. only BD and CD

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.