ควิซ Java: Checked vs Unchecked Exceptions

This Java quiz tests the difference between checked exceptions like IOException and unchecked ones like NumberFormatException. You will predict output, spot code that does not compile and decide what a method may declare with throws.

ปานกลาง 10 ข้อ ~6 นาที ผ่านที่ 80% Java 17

เลือกโหมด

กำลังเล่นแบบผู้เยี่ยมชม: เข้าสู่ระบบเพื่อเก็บ XP และ streak

ตัวอย่างคำถาม

ข้อ 1 จาก 10

Which of these is a checked exception?

ดูเฉลย

B. IOException IOException extends Exception but not RuntimeException, so the compiler makes you catch or declare it. The other three extend RuntimeException, which makes them unchecked.

ควิซนี้มีเนื้อหาอะไรบ้าง

  • Checked exceptions vs RuntimeException and its subclasses
  • Declaring with throws and the "catch or declare" rule
  • Wrapping a checked exception with a cause
  • Catch order, multi-catch and exception subclasses
  • Checked exceptions inside lambdas and overriding methods

คำถามที่พบบ่อย

ต้องมีบัญชีไหม?

ไม่ต้อง ใครก็เล่นได้ เข้าสู่ระบบเพื่อเก็บ XP, streak, เหรียญตรา และประวัติ

ทำซ้ำได้ไหม?

ได้ ระบบเก็บคะแนนที่ดีที่สุดไว้ และสลับคำถามกับตัวเลือกใหม่ทุกครั้ง