
Examen Java
Authored by HECTOR ITURBE
Other
Professional Development
Used 15+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
1 min • 2 pts
1) Dada la siguiente clase:
1. class ArrayCopy3{
2. public static void main( String [] args) {
3. int [][] z1 = new int [][] {{1,2,3}, {4,5,6}};
4. for (int j= 0;j<3; j++) {
5. System.out.println(" ");
6. for(int k= 0;k<2; k++) {
7. System.out.print(" z1 "+ j +" "+ k +" = " + z1[j][k]);
8. }
9. }
10. }
11. }
Cual seria el resultado al ejecutarla?
La compilación falla
Una excepción es lanzada en tiempo de ejecución
z1 0 0 = 1 z1 0 1 = 2 z1 0 2 = 3
z1 1 0 = 4 z1 1 1 = 5 z1 1 2 = 6
z1 0 0 = 1 z1 0 1 = 3 z1 0 2 = 5
z1 1 0 = 2 z1 1 1 = 4 z1 1 2 = 6
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Menciona los tres modificadores de acceso
Public, private, protected
Clase, static, public
Static, final, private
Class, final, static
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
¿Qué es una interface?
Una súper clase
Es un conjunto de declaraciones de funciones
Una herencia múltiple
Un fichero public
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
¿Qué se debe utilizar para simular la herencia múltiple de una clase?
Extends
Public
Implements
Interface
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Para que se utiliza la clase abstract?
Para poder ser accesibles en otras clases
Para acceder desde otros paquetes
Para la clase base para la herencia
Para ser una súper clase
6.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
¿Qué hace el siguiente código fuente?
int x=0; boolean flag = false; while ((x<10) || !flag) { System.out.println(x); x++; }
Muestra los números del 0 al 9
Muestra los números del 1 al 10
Muestra un 10
Se queda en un bucle infinito
7.
MULTIPLE CHOICE QUESTION
30 sec • 2 pts
int x= 0;
do {
System.out.println(x);
x++;
} while (x<10);
int y= 0;
while (y<10){
System.out.println(y);
y++;
}
x=9 y=9
x=10 y=10
x=9 y=10
Error de compilación
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?