A continuación tienes las preguntas relacionadas con este capítulo del curso.
Cuestionario 9. 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 the following classes:
Employee.java public class Employee { public int salary; }
========================
Manager.java public class Manager extends Employee { public int budget; }
=========================
Director.java public class Director extends Manager { public int stockOptions; }
==========================
And given the following maint method:public static void main(String[] args){ Employee employee = new Employee(); Manager manager = new Manager(); Director director = new Director(); // line n1 }
Which two option fail to compile when placed at line n1 of the main method?
CorrectoIncorrecto - Pregunta 2 de 5
2. Pregunta
Given:
class Product { double price; } public class Test { public void updatePrice(Product product, double price) { price = price * 2; product.price = product.price + price; } public static void main(String[] args) { Product prt = new Product(); prt.price = 200; double newPrice = 100; Test t = new Test(); t.updatePrice(prt, newPrice); System.out.println(prt.price + " : " + newPrice); } }
What is the result?
CorrectoIncorrecto - Pregunta 3 de 5
3. Pregunta
Given the code fragment:
if (aVar++ < 10) { System.out.println(aVar + " Hello World!"); } else { System.out.println(aVar + " Hello Universe!"); }
What is the result if the integer aVar is 9?
CorrectoIncorrecto - Pregunta 4 de 5
4. Pregunta
Given the code fragment:
public static void main(String[] args) { String date = LocalDate.parse("2014-05-04").format(DateTimeFormatter.ISO_DATE_TIME); System.out.println(date); }
What is the result?
CorrectoIncorrecto - Pregunta 5 de 5
5. Pregunta
Given the code fragment:
public static void main(String[] args) { Short s1 = 200; Integer s2 = 400; Long s3 = (long) s1 + s2; // line n1 String s4 = (String) (s3 * s2); // line n2 System.out.println("Sum is " + s4); }
What is the result?
CorrectoIncorrecto