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

    Given:

    2.

    class Test {

    3.

    public static void main(String args[]) {

    4.

    for (int i = 1; i < 5; i++) {

    5.

    if (i == 2) {

    6.

    continue;

    7.

    }

    8.

    System.out.print(" i = " + i);

    9.

    }

    10.

    }

    11.

    }

    What is the result?

    A. i = 1 i = 3 i = 4 i = 5
    B. i = 1
    C. i = 1 i = 3 i = 4
    D. The code runs with no output.
    E. i = 1 i = 2 i = 4
    F. i = 1 i = 2 i = 4 i = 5
    G. Compilation fails.

  • Question 52:

    Which two are true about the relationship "A keyboard has 101 keys."? (Choose two.)

    A. This is a many-to-many relationship.
    B. This is a composition relationship.
    C. This is a not a composition relationship.
    D. This is a one-to-one relationship.
    E. This is a one-to-many relationship.

  • Question 53:

    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; }
    B. public int calc(int n1, int n2) { return n1 + n2; }
    C. public int calc(int n1, int n2) { return; }
    D. static int calc(int n1, int n2) { return n1 + n2; }
    E. static void calc(n1, n2) { return (n1 + n2); }
    F. static int calc(int n1, n2) { return n1, n2; };

  • Question 54:

    Given:

    11.

    public class Employee {

    12.

    public String name;

    13.

    // insert code here

    14.

    15.

    public String getName() {

    16.

    return name;

    17.

    }

    18.

    19.

    public int getSalary() {

    20.

    return salary;

    21.

    }

    22.

    }

    Which, when inserted at line 13, allows another class to get the value of the salary variable, but NOT change the value of the salary variable?

    A. readOnly int salary;
    B. secure int salary;
    C. private int salary;
    D. public int salary;
    E. hidden int salary;

  • Question 55:

    Given:

    1.

    class Test {

    2.

    public static void main(String args[]) {

    3.

    String str = new String("Welcome");

    4.

    // insert code here

    5.

    }

    6.

    }

    Which, inserted at line 4, produces the output true?

    A. System.out.println(str.startsWith("W"));
    B. System.out.println(str.indexOf(1));
    C. System.out.println(str.trim());
    D. System.out.println(str.startsWith('W'));
    E. System.out.println(str.indexOf("W"));

  • Question 56:

    Given:

    1.

    abstract class A {}

    2.

    class B {}

    3.

    interface C {}

    4.

    interface D {}

    5.

    // insert code here

    Which, inserted at line 5, results in a compilation failure?

    A. class E implements C {}
    B. class E extends B implements D {}
    C. class E extends A {}
    D. interface E extends C, D {}
    E. class E extends A, B {}
    F. class E implements C, D {}

  • Question 57:

    Which two are valid? (Choose two.)

    A. enum Suit { CLUBS, DIAMONDS, HEARTS, SPADES }class EnumTest {public static void main(String args[]) {System.out.println(Suit.CLUBS);}
    B. class EnumTest {enum Days { Sat, Sun, Mon, Tue, Wed, Thu, Fri }public static void main(String args[]) {System.out.println(Days.Sat);}
    C. class EnumTest {enum Colors { Red = 1, Green = 2, Blue = 4, Yellow = 8 }public static void main(String args[]) {System.out.println(Colors.Red);}
    D. class EnumTest {public static void main(String args[]) {enum Num { ONE, TWO, THREE, FOUR } System.out.println(Num.ONE);}

  • Question 58:

    Which is valid?

    A. package com.example;class Test { }import java.util.*;
    B. package com.example;import java.util;import java.*;class Test { }
    C. package com.example;import java.util.*;import java.io.*;class Test { }
    D. import java.util.*;package com.example;class Test { }
    E. package com.example;package com.sun;import java.util.*;class Test { }

  • Question 59:

    Which two are benefits of JSP technology? (Choose two.)

    A. separation of servlet developer and JSP author roles
    B. separation of dynamic and static content
    C. simplified Swing GUI development
    D. portability to any HTTP server

  • Question 60:

    Which two are characteristics of an RDBMS? (Choose two.)

    A. An RDBMS represents data using three-dimensional tables.
    B. J2EE provides a cross-platform RDBMS.
    C. Java technologies provide capabilities for connecting a legacy RDBMS to a web application.
    D. Business-tier applications use session beans to represent rows in an RDBMS.
    E. An RDBMS represents data using two-dimensional tables.

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.