ICSE Class 10 Computer Applications
Question 37 of 46
String Handling — Question 1
Back to all questions 1
Question Question 1
The trim() method of the String class removes ............... .
- leading spaces only
- trailing spaces only
- spaces in between words
- leading and trailing spaces
leading and trailing spaces
Reason — The trim() method of the String class removes the leading and trailing spaces from a string. It does not remove the spaces present in between the string.