πŸ“Š JAVA
Q. Can a lambda expression throw a checked exception?
  • (A) No
  • (B) Yes, if declared in the functional interface
  • (C) Only runtime exceptions
  • (D) Only in custom functional interfaces
πŸ’¬ Discuss
βœ… Correct Answer: (B) Yes, if declared in the functional interface

Explanation: A lambda can throw a checked exception if the method in the functional interface declares it.

Explanation by: Mr. Dubey
A lambda can throw a checked exception if the method in the functional interface declares it.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
33
Total Visits
πŸ“½οΈ
11 mo ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
97%
Success Rate