You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Andrew Kharchuk <ak...@ukraina.com> on 2003/09/17 15:12:58 UTC

the use of String.intern() for literals

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?