Q. Which functional interface matches with `String::new` when used with a Supplier?

  • (A) Supplier<String>
  • (B) Function<Integer, String>
  • (C) Consumer<String>
  • (D) Runnable
πŸ’¬ Discuss
βœ… Correct Answer: (A) Supplier<String>
Explanation: `Supplier<String>` matches a constructor reference that takes no arguments.
Explanation by: Mr. Dubey
`Supplier<String>` matches a constructor reference that takes no arguments.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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