Just to add more information I am including one more case-

Intern Case :

System.out.prin tln("String".re place('g','G'). intern() == "String".replac e('g','G').inte rn());

will print "true"....