concept trim in category java

appears as: trim
Java SE 11 Programmer I Certification Guide

This is an excerpt from Manning's book Java SE 11 Programmer I Certification Guide.

All the methods defined in the class String, such as substring, concat, toLower-Case, toUpperCase, trim, and so on, which seem to modify the contents of the String object on which they’re called, create and return a new String object rather than modify the existing value.