Describe the purpose and write the syntax of trim() function.
21 Likes
It removes all leading and trailing space from the string.Syntax:
String <variable-name> = <string-variable>.trim();
Answered By
13 Likes
How does endsWith() and startsWith() differ? Explain with an example.
Describe the purpose and write the syntax of toUpperCase() function.
Describe the purpose and write the syntax of toLowerCase() function.
Describe the purpose and write the syntax of length() function.