A continuación tienes las preguntas relacionadas con este capítulo del curso.
Cuestionario 14. 1Z0-808
Resumen del Cuestionario
0 of 5 Preguntas completed
Preguntas:
Información
Ya has completado el cuestionario anteriormente. Por lo tanto no puedes iniciarlo de nuevo.
Cargando Cuestionario…
Debes iniciar sesión o registrarte para empezar el cuestionario.
En primer lugar debes completar esto:
Resultados
Resultados
0 de 5 Preguntas respondidas correctamente
Tu tiempo:
El tiempo ha pasado
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
Categorías
- Sin categorizar 0%
- 1
- 2
- 3
- 4
- 5
- Actual
- Revisar
- Respondido/a
- Correcto
- Incorrecto
- Pregunta 1 de 5
1. Pregunta
Given:
Base.java class Base { public void test() { System.out.println("Base "); } }
=======================================
DerivedA.java class DerivedA extends Base { public void test() { System.out.println("DerivedA"); } }
========================================
DerivedB.java class DerivedB extends Base { public void test() { System.out.println("DerivedB"); } public static void main() { Base b1 = new DerivedB(); Base b2 = new DerivedA(); Base b3 = new DerivedB(); b1 = (Base) b3; Base b4 = (DerivedA) b3; b1.test(); b4.test(); } }
What is the result?
CorrectoIncorrecto - Pregunta 2 de 5
2. Pregunta
Given the code fragment:
public static void main(String[] args) { ArrayList myList = new ArrayList(); String[] myArray; try { while (true) { myList.add("My String"); } } catch (RuntimeException re) { System.out.println("Caught a RuntimeException"); } catch (Exception e) { System.out.println("Caught a Exception"); } System.out.println("Ready to use"); }
What is the result?
CorrectoIncorrecto - Pregunta 3 de 5
3. Pregunta
Given:
System.out.println("5 + 2 = " + 3 + 4); System.out.println("5 + 2 = " + (3 + 4));
What is the result?
CorrectoIncorrecto - Pregunta 4 de 5
4. Pregunta
Given:
public static void main(String[] args) { String ta = "A "; ta = ta.concat("B "); String tb = "C "; ta = ta.concat(tb); ta.replace('C', 'D'); ta = ta.concat(tb); System.out.println(ta); }
What is the result?
CorrectoIncorrecto - Pregunta 5 de 5
5. Pregunta
Given the code fragment:
public static void main(String[] args) { int x = 5; while (isAvailable(x)) { System.out.print(x); } } public static boolean isAvailable(int x) { return x-- > 0 ? true : false; }
Which modification enables the code to print 54321?
CorrectoIncorrecto