Beruflich Dokumente
Kultur Dokumente
Test 10834
Pregunta 1
1. true
2. false
3. undefined
4. "i == 1"
Pregunta 2
Para que una condicin con el operador || sea verdadera se tiene que cumplir que...
1. Cualquier operando sea true
2. Todos los operandos sean true
http://www.testprogramacion.com/java/10834 1/19
20/11/2014 Test 10834 en Java | Test de Programacin
Pregunta 3
1. Estructura Secuencial
2. Estructura Repetitiva
3. Estructura Selectiva
4. Ninguna de las tres anteriores.
Pregunta 4
Pregunta 5
http://www.testprogramacion.com/java/10834 2/19
20/11/2014 Test 10834 en Java | Test de Programacin
Pregunta 6
Pregunta 7
1. Estructura Selectiva
2. Estructura Secuencial
3. Estructura Repetitiva
4. Ninguna de las tres anteriores.
Pregunta 8
http://www.testprogramacion.com/java/10834 3/19
20/11/2014 Test 10834 en Java | Test de Programacin
int x=2;
switch (x) {
case 1:
System.out.println("Uno");
break;
case 2:
System.out.println("Dos");
break;
case 3:
System.out.println("Tres");
break;
default:
System.out.println("Otro nmero");
}
1. Uno
2. Dos
3. Tres
4. Otro nmero
Pregunta 9
1. 8
2. 5
3. 4
4. 2
Pregunta 10
http://www.testprogramacion.com/java/10834 4/19
20/11/2014 Test 10834 en Java | Test de Programacin
3. double
4. single
Pregunta 11
contador += x;
System.out.println(contador);
1. 3
2. 1
3. 0
4. El programa no compila
Pregunta 12
1. 5
2. 8
3. true
4. 3
Pregunta 13
http://www.testprogramacion.com/java/10834 5/19
20/11/2014 Test 10834 en Java | Test de Programacin
int x = 0;
int y = 0;
while (x<10) {
y += x;
x++;
}
System.out.println(y);
Pregunta 14
Pregunta 15
http://www.testprogramacion.com/java/10834 6/19
20/11/2014 Test 10834 en Java | Test de Programacin
Pregunta 16
while (y<x) {
y += x;
}
System.out.println(y);
1. 0
2. 1
3. 10
4. Ninguno, entra en bucle infinito
Pregunta 17
Pregunta 18
http://www.testprogramacion.com/java/10834 7/19
20/11/2014 Test 10834 en Java | Test de Programacin
1. Operador %
2. Math.percentage
3. Math.percent
4. Hay que calcularlo a mano
Pregunta 19
1. Estructura Secuencial
2. Estructura Repetitiva
3. Estructura Selectiva
4. Ninguna de las tres anteriores.
Pregunta 20
Pregunta 21
http://www.testprogramacion.com/java/10834 8/19
20/11/2014 Test 10834 en Java | Test de Programacin
1. */%
2. +-
3. ++expresion
4. <<
Pregunta 22
1. 6
2. 5
3. 4
4. true
Pregunta 23
Pregunta 24
http://www.testprogramacion.com/java/10834 9/19
20/11/2014 Test 10834 en Java | Test de Programacin
int x = 0;
int y = 0;
while (x<10) {
y += x;
x++;
}
System.out.println(y);
1. 0
2. 10
3. 11
4. 45
Pregunta 25
1. 6
2. true
3. 4
4. 2
Pregunta 26
http://www.testprogramacion.com/java/10834 10/19
20/11/2014 Test 10834 en Java | Test de Programacin
Pregunta 27
Pregunta 28
Pregunta 29
1. 6
2. 5
3. 1
4. 0
Pregunta 30
http://www.testprogramacion.com/java/10834 11/19
20/11/2014 Test 10834 en Java | Test de Programacin
y /= ++x;
System.out.println(x);
1. 6
2. 5
3. 1
4. 0
Pregunta 31
Pregunta 32
http://www.testprogramacion.com/java/10834 12/19
20/11/2014 Test 10834 en Java | Test de Programacin
Pregunta 33
while (x<5) {
y +=x;
x++;
System.out.println(y);
1. 10
2. 5
3. 0
4. El programa no compila
Pregunta 34
1. true
2. false
3. undefined
4. Da error de compilacin
Pregunta 35
http://www.testprogramacion.com/java/10834 13/19
20/11/2014 Test 10834 en Java | Test de Programacin
if (x==1)
System.out.println("Es uno");
else;
System.out.println("No es uno");
1. "Es uno"
2. "No es uno"
3. "Es uno" y "No es uno"
4. Ninguna de las tres opciones
Pregunta 36
y *= x++;
System.out.println(y);
1. 25
2. 30
3. 6
4. 35
Pregunta 37
total -= --contador;
System.out.println(total);
http://www.testprogramacion.com/java/10834 14/19
20/11/2014 Test 10834 en Java | Test de Programacin
1. 10
2. 7
3. 6
4. 4
Pregunta 38
Cual es el valor de x?
double x = Math.pow(2, 4);
1. 24.0
2. 16.0
3. 8.0
4. 4.0
Pregunta 39
Pregunta 40
1. true
2. false
http://www.testprogramacion.com/java/10834 15/19
20/11/2014 Test 10834 en Java | Test de Programacin
3. 12
4. 13
Pregunta 41
Pregunta 42
1. No es correcta, no compila.
2. Suma el valor de X+Y a Z y luego incrementa en uno la X
3. Incrementa en uno el valor de la X y lo suma a Y para asignrselo a Z
4. Suma uno a X y se lo asigna a Z, luego suma y a Z
Pregunta 43
1. true
2. false
3. 3
4. 2
http://www.testprogramacion.com/java/10834 16/19
20/11/2014 Test 10834 en Java | Test de Programacin
Pregunta 44
x %= y;
System.out.println(y);
1. 4
2. 3
3. 2
4. 1
Pregunta 45
1. 6
2. 5
3. 9
4. 7
Pregunta 46
1. "Hola Mundo"
2. "Hola\nMundo"
3. "Hola" y en otra lnea "Mundo"
http://www.testprogramacion.com/java/10834 17/19
20/11/2014 Test 10834 en Java | Test de Programacin
Pregunta 47
if (x<10)
if (y<10)
System.out.println("Uno");
else
System.out.println("Dos");
System.out.println("Tres");
Pregunta 48
1. No compila, es erronea.
2. Decrementa contador a total y luego resta uno a contador.
3. Decrementa uno al contador y luego se lo resta a total.
4. Decrementa uno al contador y luego se lo asigna a total.
Pregunta 49
http://www.testprogramacion.com/java/10834 18/19
20/11/2014 Test 10834 en Java | Test de Programacin
int j=2;
System.out.println ( j == 3 );
1. true
2. false
3. undefined
4. "j == 3"
Pregunta 50
Publicar mi resultado
(http://twitter.com/testprogramar) (http://www.facebook.com/TestProgramacion)
http://www.testprogramacion.com/java/10834 19/19