GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Quiz

Ohne Titel

Fausto Trindade 5 Fragen

Quiz starten

Fragen in diesem Quiz (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?Bild zu Frage 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

Informationen

Beschreibung
OCA/OCP JAVA 8(PRACTICE EXAM) Quiz am Ohne Titel, erstellt von Fausto Trindade am 27/12/2020.
Sprache
Português
Aufrufe
0
Bewertung
Noch keine Bewertungen
Bewerte dieses Quiz
Bewerte dieses Quiz

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck