class Alias { public static void main (String[] args) { String strA; // reference to the object String strB; // another reference to the object // Create the only object and save its // reference in strA strA = new String("only one string"); System.out.println(strA); strB = strA; // copy the reference to strB. System.out.println(strB); } }