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

    Given:

    3.

    int num = 0, count;

    4.

    while ( num < 3 ) {

    5.

    num++;

    6.

    // insert code here

    7.

    System.out.println("num = " + num + " : count = " + count);

    8.

    }

    9.

    }

    Which, inserted at line 6, produces the following output?

    num = 1 : count = 1 num = 1 : count = 2 num = 2 : count = 1 num = 2 : count = 2 num = 3 : count = 1 num = 3 : count = 2

    A. while ( ++count < 3 ) {
    B. for ( count = 1 ; count < 3 ; count++ ) {
    C. for ( count = 0 ; count < 3 ; count++ ) {
    D. while ( ++count < 2 ) {
    E. for ( count = 1 ; count < 2 ; count++ ) {

  • Question 132:

    A developer must implement a "shopping cart" object for a web-based application. The shopping cart must be able to maintain the state of the cart, but the state is not stored persistently. Which J2EE technology is suited to this goal?

    A. JAX-RPC
    B. entity beans
    C. stateful session beans
    D. stateless session beans
    E. JMS

  • Question 133:

    Which is a benefit of Swing clients?

    A. They can be used without a JRE on the client.
    B. They are easier to deploy than thin clients.
    C. They can provide a richer graphical user interface experience than thin clients.
    D. They are more universally supported by browsers than thin clients.

  • Question 134:

    Given:

    1.

    class Test {

    2.

    public static void main(String[] args) {

    3.

    int num = 1;

    4.

    for (num = 0; num < 3; ++num ) {

    5.

    num *= 2;

    6.

    }

    7.

    System.out.println("num = " + (num++));

    8.

    }

    9.

    }

    What is the result?

    A. num = 4
    B. Compilation fails.
    C. num = 2
    D. num = 3
    E. num = 5

  • Question 135:

    Which J2EE technology is used to generate dynamic content for web-based applications?

    A. JAX-RPC
    B. JNDI
    C. JMS
    D. SOAP
    E. JSP

  • Question 136:

    You need an algorithm that must:

    Print the characters of a String, in index order Skip all instances of the character 'a' that appear in the String

    Given:

    2.

    public void foo (String s) {

    3.

    // insert code here

    4.

    }

    Which two, inserted independently at line 3, correctly implement the algorithm? (Choose two.)

    A. int i = 0;while (i < s.length()) {if (s.charAt(i) != 'a') {System.out.print(i);}i++;}
    B. for(char c:s) {if (c != 'a') System.out.print(c);}
    C. for(int i = 0; i < s.length(); i++) {char c = s.charAt(i);if (c != 'a') System.out.print(c);}
    D. for (int i = 0; i < s.length(); i++) {if (s.charAt(i) != 'a') System.out.print(i);}
    E. int i = 0;while (i < s.length()) {if (s.charAt(i) != 'a') {System.out.print(s.charAt(i));}i++;}

  • Question 137:

    Which two are true about J2ME? (Choose two.)

    A. It provides a built-in database.
    B. It is the foundation platform for J2SE.
    C. It can be used to create applications that run on mobile phones.
    D. It can be used to create Swing applications.

  • Question 138:

    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 8.
    B. x = 3 , y = 7
    C. Compilation fails because of an error at line 11.
    D. Compilation fails because of an error at line 9.
    E. x = 53 , y = 97
    F. Compilation fails because of an error at line 10.

  • Question 139:

    Which package contains classes used to create data collections, such as maps or queues?

    A. java.lang
    B. java.io
    C. java.awt
    D. java.net
    E. javax.swing
    F. java.util

  • Question 140:

    Which three are legal ways to declare and initialize an instance variable? (Choose three.)

    A. public Integer f = new Integer(42);
    B. static Integer f = new Integer(42);
    C. public Integer f = null;
    D. static int x = 42;
    E. public int x = 'c';
    F. public int x = null;

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.