1.

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

Answer»

The CORRECT ANSWER is (b) trim()

To EXPLAIN I would SAY: NONE.



Discussion

No Comment Found

Related InterviewSolutions