A continuación tienes las preguntas relacionadas con este capítulo del curso.
Cuestionario 15. 1Z0-808
Resumen del Cuestionario
0 of 6 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 6 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
- 6
- Actual
- Revisar
- Respondido/a
- Correcto
- Incorrecto
- Pregunta 1 de 6
1. Pregunta
Given the code fragment:
public static void main(String[] args) { boolean opt = true; switch (opt) { case true: System.out.print("True"); break; default: System.out.print("***"); } System.out.println("Done"); }
Which modification enables the code fragment to print TrueDone?
CorrectoIncorrecto - Pregunta 2 de 6
2. Pregunta
Given the following main method:
public static void main(String[] args) { int num = 5; do { System.out.print(num-- + " "); } while (num == 0); }
What is the result?
CorrectoIncorrecto - Pregunta 3 de 6
3. Pregunta
Given the code fragment:
int x = 100; int a = x++; int b = ++x; int c= x++; int d =(a
What is the result?
CorrectoIncorrecto - Pregunta 4 de 6
4. Pregunta
Given:
public class Test { public static void main(String[] args) { String[][] chs = new String[2][]; chs[0] = new String[2]; chs[1] = new String[5]; int i = 97; for (int a = 0; a < chs.length; a++) { for (int b = 0; b < chs.length; b++) { chs[a][b] = "" + i; i++; } } for (String[] ca : chs) { for (String c : ca) { System.out.print(c + " "); } System.out.println(); } } }
What is the result?
CorrectoIncorrecto - Pregunta 5 de 6
5. Pregunta
Given the code fragment:
public class Employee { String name; boolean contract; double salary; Employee() { // line n1 } public String toString() { return name + ":" + contract + ":" + salary; } public static void main(String[] args) { Employee e = new Employee(); // line n2 System.out.print(e); } }
Which two modifications, when made independently, enable the code to print joe:true:100.0?
CorrectoIncorrecto - Pregunta 6 de 6
6. Pregunta
View the exhibit:
public class Student { public String name = ""; public int age = 0; public String major = "Undeclared"; public boolean fulltime = true; public void display() { System.out.println("Name: " + name + " Major: " + major); } public boolean isFullTime() { return fulltime; } }
Which line of code initializes a student instance?
CorrectoIncorrecto