¡GoConqr estrena diseño! Cuéntanos qué te parece.

Test

Sin título

Fausto Trindade 5 preguntas

Hacer el test

Preguntas del test (5)

  1. 1package mind;
    public class Remember {
    public static void think() throws Exception { // k1
    try {
    throw new Exception();
    }
    }
    public static void main(String... ideas) throws Exception {
    think();
    }
    }
    1. AThe code compiles and runs without printing anything.
    2. BThe code compiles but a stack trace is printed at runtime.
    3. CThe code does not compile because of line k1.
    4. DThe code does not compile for another reason.
  2. 2Choose the answer that lists the keywords in the order that they would be used together.
    1. Acatch, try, finally
    2. Btry, catch, finally
    3. Cfinally, catch, try
    4. Dtry, finally, catch
  3. 3Which of the following diagrams of java.lang classes shows the inheritance model properly?Imagen de la pregunta 3
    1. AA
    2. BB
    3. CC
    4. DD
  4. 4Which of the following Throwable types is it recommended not to catch in a Java
    application?
    1. AError
    2. BCheckedException
    3. CException
    4. DRuntimeException
  5. 5What is the output of the following application?

    package game;
    public class Baseball {
    public static void main(String... teams) {
    try {
    int score = 1;
    System.out.print(score++);
    } catch (Throwable t) {
    System.out.print(score++);
    } finally {
    System.out.print(score++);
    }
    System.out.print(score++);
    }
    }
    1. A123
    2. B124
    3. C12
    4. DNone of the above

Información

Descripción
OCA/OCP JAVA 8(PRACTICE EXAM) Test sobre Sin título, creado por Fausto Trindade el 27/12/2020.
Idioma
Português
Visitas
0
Valoración
Aún sin valoraciones
Valora este test
Valora este test

Escríbenos

¿Sobre qué es tu mensaje?

¿Qué te parece el nuevo diseño?

¿Te gusta?