String is not primitive data type like int, long or double. String is a class or in simple world you can say user defined type. String is a Class which is defined in java.lang package and wrappers its content in a character array. String in immutable and final in Java and JVM uses String Pool to store all the String objects. String object using double quotes and overloading of “+” operator for concatenation.
String provides equals() method to compare two String and some other methods like toUpperCase() to convert String into upper case, replace() to replace String contents, substring() to get substring, split() to split long String into multiple String.
The eight primitive data types are: byte, short, int, long, float, double, boolean, and char. The java.lang.String class represents character strings.