¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

Tercer Set de Preguntas Java OCA Exam (1z0-803)

webmasterMyJavaZone 15 preguntas 33.648 visitas 5,0 (1 valoración)

Hacer el test

Preguntas del test (15)

  1. 1Given the following code segment, what would be the output?

    int a = 0;
    int b = 0;
    int c = 0;
    System.out.println(a++ + " " + --b + " " + c++ + " " + a + " " + b);
    1. A1 0 1 0 0
    2. B0 0 0 0 0
    3. C1 0 1 1 -1
    4. D0 -1 0 1 -1
  2. 2Which of the following string classes create mutable strings? (Choose all that apply.)
    1. AString
    2. BStringBuffer
    3. CStringBuilder
  3. 3Choose the simplest data structure to use to store multiple like variables that could then be accessed by an index.
    1. APrimitive
    2. BObject
    3. CArray
    4. DEnumeration
  4. 4Which of the statements are correct? (Choose all that apply.)
    1. A3.0 is a valid literal for an int.
    2. B3.0 is a valid literal for a float.
    3. C3 is a valid literal for an int.
    4. D3 is a valid literal for a float.
    5. E3f is a valid literal for an int.
    6. F3f is a valid literal for a float.
  5. 5What literal values are acceptable to use with the boolean primitive?
    1. Atrue and false
    2. Btrue, false, and null
    3. Ctrue, false, TRUE, and FALSE
    4. DTRUE and FALSE
  6. 6Which code segments related to enumerations will result in a compiler error? (Choose all that apply.)
    1. Aenum Coin {PENNY, NICKEL, DIME, QUARTER}
      Coin coin = Coin.NICKEL;
    2. Benum Coin {PENNY, NICKEL, DIME, QUARTER}
      Coin coin;
      coin = Coin.NICKEL;
    3. Cenum Coin {PENNY, NICKEL, DIME, QUARTER}
      Coin coin = NICKEL;
    4. Denum Coin {penny, nickel, dime, quarter}
      Coin coin = Coin.NICKEL;
  7. 7Consider the following declarations. Which declaration has an element name that does not conform to standard naming conventions?
    1. Astatic final int varName;
    2. BInteger IntName;
    3. Cvoid getName () {…}
    4. Dpublic class Name {…}
  8. 8Java 7 added the allowance of a special character to indentify places. Which declaration is correct?
    1. Aint investment = 1x000x000;
    2. Bint investment = 1_000_000;
    3. Cint investment = 1^000^000;
    4. Dint investment = 1-000-000;
  9. 9What are the wrapper classes for the primitives boolean, char, short, int, and double?
    1. ABoolean, Char, Short , Int , Double
    2. BBoolean, Char, Short, Integer, Double
    3. CBoolean, Character, Short, Int, Double
    4. DBoolean, Character, Short, Integer, Double
  10. 10Which of the following statements contain literal values?
    1. Aint maxHorsePower = 170;
    2. Bfloat currentHorsePower = (float) maxHorsePower;
    3. Cfloat idleHorsePower = ((float) currentHorsePower) / 10);
    4. DSystem.out.println("Current HP: " + currentHorsePower);

Información

Descripción
Test sobre Tercer Set de Preguntas Java OCA Exam (1z0-803), creado por webmasterMyJavaZone el 23/06/2014.
Idioma
Español
Visitas
33.648
Valoración
5,0 de 5 · 1 valoración
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?