The java.lang.String class in Java provides a lot of methods to work on string. By the help of these methods, we can perform operations on string such as trimming, concatenating, converting, comparing, replacing strings etc.
String is a sequence of characters, for e.g. “Hello” is a string of 5 characters. In java, string is an immutable object which means it is constant and can cannot be changed once it has been created.
JAVA String Class
There are two ways to create a String object:
By strin...
Published on May 31, 2020 06:26