A continuación tienes las preguntas relacionadas con este capítulo del curso.
Cuestionario 5. 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
String[] strs = new String[2]; int idx = 0; for (String s : strs) { strs[idx].concat(" element " + idx); idx++; } for (idx = 0; idx < strs.length; idx++) { System.out.println(strs[idx]); }
What is the result?
CorrectoIncorrecto - Pregunta 2 de 5
2. Pregunta
Given:
class Vehicle { int x; Vehicle() { this(10); // line n1 } Vehicle(int x) { this.x = x; } } class Car extends Vehicle { int y; Car() { super(); this(20); // line n2 } Car(int y) { this.y = y; } public String toString() { return super.x + ":" + this.y; } }
And given the code fragment:
Vehicle y = new Car(); System.out.println(y);
CorrectoIncorrecto - Pregunta 3 de 5
3. Pregunta
MyString.java package p1; class MyString { String msg; MyString(String msg) { this.msg = msg; } }
=========================================================
Test.java package p1; public class Test { public static void main(String[] args) { System.out.println("Hello " + new StringBuilder("Java SE 8")); System.out.println("Hello " + new MyString("Java SE 8")); } }
What is the result?
CorrectoIncorrecto - Pregunta 4 de 5
4. Pregunta
Given the code fragment:
1. public static void main(String[] args) { 2. int iVar = 100; 3. float fVar = 100.100f; 4. double dVar = 123; 5. iVar = fVar; 6. fVar = iVar; 7. dVar = fVar; 8. fVar = dVar; 9. dVar = iVar; 10. iVar = dVar; }
Which three line fails to compile?
CorrectoIncorrecto - Pregunta 5 de 5
5. Pregunta
Given:
MainTest.java public class MainTest { public static void main(int[] args) { System.out.println("int main " + args[0]); } public static void main(Object[] args) { System.out.println("Object main " + args[0]); } public static void main(String[] args) { System.out.println("String main " + args[0]); } }
And the commands:
javac MainTest.java
java MainTest 1 2 3What is the result?
CorrectoIncorrecto