Q. Which method reference would replace `str -> str.trim()`?
β
Correct Answer: (B)
String::trim
Explanation: `String::trim` is used to remove leading and trailing spaces.