Q. Which method reference would map a collection of strings to their lengths?

  • (A) String::length
  • (B) String::valueOf
  • (C) String::charAt
  • (D) String::substring
πŸ’¬ Discuss
βœ… Correct Answer: (A) String::length
Explanation: `String::length` returns the length of each string.
Explanation by: Mr. Dubey
`String::length` returns the length of each string.

πŸ’¬ Discussion


πŸ“Š Question Analytics

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