Q. Can method references replace lambda expressions?

  • (A) No
  • (B) Yes, when the lambda body is just a method call
  • (C) Only for static methods
  • (D) Only in Java 9 and above
πŸ’¬ Discuss
βœ… Correct Answer: (B) Yes, when the lambda body is just a method call
Explanation: Method references can replace lambdas when the lambda body directly calls a method.
Explanation by: Mr. Dubey
Method references can replace lambdas when the lambda body directly calls a method.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
83
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Mr. Dubey
Publisher
πŸ“ˆ
81%
Success Rate