Q. In Java, can a "try" block have multiple "catch" blocks?

  • (A) No, a "try" block can have only one "catch" block
  • (B) Only if the "try" block is marked as "static"
  • (C) Yes, a "try" block can have multiple "catch" blocks to catch different types of exceptions
  • (D) Only if the "catch" blocks are marked as "final"
πŸ’¬ Discuss
βœ… Correct Answer: (C) Yes, a "try" block can have multiple "catch" blocks to catch different types of exceptions

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
141
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Ritu Singhal
Publisher
πŸ“ˆ
81%
Success Rate