KnowledgeBoat Logo

Computer Applications

Describe the purpose and write the syntax of trim() function.

Java String Handling

21 Likes

Answer

It removes all leading and trailing space from the string.
Syntax:


String <variable-name> = <string-variable>.trim();

Answered By

13 Likes


Related Questions