Q. In Java, can a method declare multiple exceptions using the "throws" keyword?

  • (A) Only if the method is marked as "static"
  • (B) Yes, a method can declare multiple exceptions separated by commas
  • (C) Only if the exceptions are marked as "final"
  • (D) Only if the method is marked as "final"
πŸ’¬ Discuss
βœ… Correct Answer: (B) Yes, a method can declare multiple exceptions separated by commas

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
130
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Sandhya Thakur
Publisher
πŸ“ˆ
96%
Success Rate