Which of these method of class String is used to remove leading and trailing whitespaces?

  1. startsWith()
  2. trim()
  3. Trim()
  4. doTrim()
Correct answer trim()

Explanation

Update: Admin added a tag on this question

Topics

By Admin · · 49 views