The java. lang. String class provides a lot of built-in methods that are used to manipulate string in Java . By the help of these methods, we can perform operations on String objects such as trimming, concatenating, converting, comparing, replacing strings etc.