A continuación tienes las preguntas relacionadas con este capítulo del curso.
Cuestionario 10. 1Z0-808
Resumen del Cuestionario
0 of 4 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 4 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
- Actual
- Revisar
- Respondido/a
- Correcto
- Incorrecto
- Pregunta 1 de 4
1. Pregunta
What is the name of the Java concept that uses access modifiers to protect variables and hide them within a class?
CorrectoIncorrecto - Pregunta 2 de 4
2. Pregunta
Given the code fragment:
abstract class Planet { protected void revolve() { // line n1 } abstract void rotate(); // line n2 } class Earth extends Planet { void revolve() { // line n3 } protected void rotate() { // line n4 } }Which two modifications, made independently, enable the code to compile?
CorrectoIncorrecto - Pregunta 3 de 4
3. Pregunta
Given:
class Vehicle { String type = "4W"; int maxSpeed = 100; Vehicle(String type, int maxSpeed) { this.type = type; this.maxSpeed = maxSpeed; } } class Car extends Vehicle { String trans; Car(String trans) { // line n1 this.trans = trans; } Car(String type, int maxSpeed, String trans) { super(type, maxSpeed); this(trans); //line n2 } }And given the code fragment:
public static void main(String[] args) { Car c1 = new Car("Auto"); Car c2 = new Car("4W", 150, "Manual"); System.out.println(c1.type + " " + c1.maxSpeed + " " + c1.trans); System.out.println(c2.type + " " + c2.maxSpeed + " " + c2.trans); }What is the result?
CorrectoIncorrecto - Pregunta 4 de 4
4. Pregunta
Given the code fragment:
class X { public void printFileContent() { /* code goes here */ throw new IOException(); } } public class Test { public static void main(String[] args) { X xobj = new X(); xobj.printFileContent(); } }Which two modifications should you make so that the code compiles successfully?
CorrectoIncorrecto