The String class in Java is a data type that can hold string literals. String is a reference data type, as are all non-primitive data types. This means that the variable contains an address to an object in the memory, and not the object itself. A String object is created in the memory, and the address to the object is returned to the variable.
As seen below, string literals are delimited by double quotes. This is actually a shorthand notation for the regular reference type initialization (creation) syntax, which uses the new keyword.
String a = "Hello";String b = new String(" World");
The plus sign is used ...