The last rose of summer. Java also does something to optimize performance, but ignore this for now. A String created in this short-cut way is called a String literal. Only Strings have a short-cut like this. All other objects are constructed by using the new operator.
Some methods require a parameter that is a reference to a String object.
That method is called with a parameter, a reference to stringB . The previous paragraph is accurate, but awkward. This is fine, as long as you remember that a variable like stringA is not the object, but only a reference to an object. This may seem picky, but there is nothing quite as picky as a computer. To avoid future confusion, make sure you understand variables, objects, and references.