Java String In Java, string is basically an object that represents sequence of char values. An array of characters works same as Java string. For example: char [] ch={'j','a','v','a','t','p','o','i','n','t'}; String s=new String(ch); is same as: the String s="javatpoint"; Java String class provides a lot of methods to perform operations on strings such as compare(), concat(), equals(), split(), length(), replace(), compareTo(), intern(), substring() etc. The java.lang.String class implements Serializable, Comparable and CharSequence interfaces. CharSequence Interface The CharSequence interface is used to represent the sequence of characters. String, StringBuffer and StringBuilder classes implement it. It means, we can create strings in Java by using these three classes. The Java String is immutable which means it cannot be changed. Whenever we change any string, a new instance is created...
It's easy to hub the internet