Java lang string class Class in Java

Whenever we put in a String literal, like "puppy", what actually happens is that Java makes a new String object with that contents and then uses it right there. So we could match a literal String to a regular expression in a really-hardwired way, declaring no variables to hold the String or Pattern: ................
................