Which of these method of class String is used to remove leading and trailing whitespaces?
(a) startsWith()
(b) trim()
(c) Trim()
(d) doTrim()
This question was addressed to me during an online interview.
Asked question is from Searching & Modifying a String in section String Handling of Java