A

Admin • 831.35K Points
Coach

Q. Which method reference would replace `str -> str.trim()`?

  • (A) String::toUpperCase
  • (B) String::trim
  • (C) String::substring
  • (D) String::isEmpty

Explanation by: Admin
`String::trim` is used to remove leading and trailing spaces.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.