πŸ“Š JAVA
Q. What functional interface would you use with `String::length` in a stream mapping?
  • (A) Function<String, Integer>
  • (B) Predicate<String>
  • (C) Supplier<Integer>
  • (D) Consumer<String>
πŸ’¬ Discuss
βœ… Correct Answer: (A) Function<String, Integer>

Explanation: `Function<String, Integer>` matches input String and returns Integer length.

Explanation by: Mr. Dubey
`Function<String, Integer>` matches input String and returns Integer length.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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