Q. In Java, can a "catch" block catch exceptions of a superclass type?

  • (A) Yes, a "catch" block can catch exceptions of a superclass type
  • (B) No, a "catch" block can only catch exceptions of the exact type
  • (C) Only if the superclass is marked as "final"
  • (D) Only if the subclass is marked as "static"
πŸ’¬ Discuss
βœ… Correct Answer: (A) Yes, a "catch" block can catch exceptions of a superclass type

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
134
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Gopal Sharma
Publisher
πŸ“ˆ
82%
Success Rate