Java stores object values in heap memory; references to the value are stored in the stack. Another way to create strings is to use the new keyword, as in the following example. String s1 = new String( ...
For example, you can start a Java variable with a dollar sign or an underscore -- but nobody does that. Sometimes machine-generated code prepends a dollar sign or underscores a Java variable to ...