We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e2ce168 commit 36ef37eCopy full SHA for 36ef37e
src/test/java/pl/mperor/interview/tasks/QuizQuestionsTest.java
@@ -301,4 +301,13 @@ public boolean finallyVsTry() {
301
return false;
302
}
303
304
+
305
+ @Test
306
+ public void testThrowableInheritanceHierarchy() {
307
+ // What is the inheritance hierarchy for the Throwable class in Java?
308
309
+ assertInstanceOf(Throwable.class, new Exception());
310
+ assertInstanceOf(Throwable.class, new Error());
311
+ assertInstanceOf(Exception.class, new RuntimeException());
312
+ }
313
0 commit comments