In the Java language, you specify literal strings between double quotes just like
in C and C++.
"Hello World!"
You can use literal strings anywhere you would use a String object.
For example, System.out.println() accepts a String argument, so you
could use a literal string in place of a String there.
System.out.println("And might I add that you look lovely today.");
You can also use String methods directly from a literal string.
int len = "Goodbye Cruel World".length();
Because the compiler automatically creates a new String object for
every literal string it encounters, you can use a literal string
to initialize a String.
String s = "Hola Mundo";
The above construct is equivalent to, but more efficient than, this one
String s = new String("Hola Mundo");
because the compiler ends up creating two Strings instead of one:
first when the compiler encounters "Hola Mundo!", and second when
it encounters new String().