Q. What is the purpose of the "finally" block in Java exception handling?

  • (A) To throw exceptions explicitly
  • (B) To specify code that must be executed regardless of whether an exception is thrown or caught
  • (C) To specify the exception type
  • (D) When an exception does not rise
πŸ’¬ Discuss
βœ… Correct Answer: (B) To specify code that must be executed regardless of whether an exception is thrown or caught

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

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