A continuación tienes las preguntas relacionadas con este capítulo del curso.
Cuestionario 4. 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:
public class Test { public static void main(String[] args) { if (args[0].equals("Hello") ? false : true) { System.out.println("Success"); } else { System.out.println("Failure"); } } }
And given the commands:
javac Test.Java
java Test HelloWhat is the result:
CorrectoIncorrecto - Pregunta 2 de 6
2. Pregunta
Which three statements describe the object-oriented features of the Java language?
CorrectoIncorrecto - Pregunta 3 de 6
3. Pregunta
Given the following code:
public static void main(String[] args) { String[] planets = {"Mercury", "Venus", "Earth", "Mars"}; System.out.println(planets.length); System.out.println(planets[1].length()); }
What is the output?
CorrectoIncorrecto - Pregunta 4 de 6
4. Pregunta
You are developing a banking module. You have developed a class named ccMask that has a maskcc method.
Given the code fragment:class CCMask { public static String maskCC(String creditCard) { String x = "XXXX-XXXX-XXXX-"; //line n1 } public static void main(String[] args) { System.out.println(maskCC("1234-5678-9101-1121")); } }
You must ensure that the maskcc method returns a string that hides all digits of the credit card number except the four last digits (and the hyphens that separate each group of four digits).
Which two code fragments should you use at line n1, independently, to achieve this requirement?
CorrectoIncorrecto - Pregunta 5 de 6
5. Pregunta
Given the code fragment:
public class App { public static void main(String[] args) { String str1 = "Java"; String str2 = new String("java"); //line n1 { System.out.println("Equal"); } else { System.out.println("Not Equal"); } } }
Which code fragment, when inserted at line n1, enables the App class to print Equal?
CorrectoIncorrecto - Pregunta 6 de 6
6. Pregunta
Given:
public class SumTest { public static void doSum(Integer X, Integer Y) { System.out.println("Integer sum is " + (X + Y)); } public static void doSum(double x, double Y) { System.out.println("double sum is " + (x + Y)); } public static void doSum(float x, float Y) { System.out.println("float sum is " + (x + Y)); } public static void doSum(int x, int Y) { System.out.println("int sum is " + (x + Y)); } public static void main(String[] args) { doSum(10, 20); doSum(10.0, 20.0); } }
What is the result?
CorrectoIncorrecto