I have found the following line in org.apache.xerces.impl.Constants: public static final String NS_DTD ="http://www.w3.org/TR/REC-xml".intern(); @version $Id: Constants.java,v 1.31 2003/07/18 17:34:37 elena Exp $ Why the author used intern() for string literal?