Originally posted by Sanjeev Kumar Singh: However the methods substring and toUpperCase will not made the new String always. name = name.substring(0, name.length()); //No new object will be created name = name.toUpperCase(); // No new object creation