[jdom-interest] Using equals()

Paul_Ramsden at arburg.com Paul_Ramsden at arburg.com
Tue Jul 17 01:37:18 PDT 2001


Hello all! I just picked up JDOM and it looks really useful - great work!

A question. Should the following be true or false...

        String n = "Name";
        String v = "Value";
        Attribute a1 = new Attribute( n, v );
        Attribute a2 = new Attribute( n, v );

        System.out.println(a1.toString()+":"+a2.toString());

        System.out.println("Same content? " + (a1.equals(a2)) );

I thought it should be true but I'm getting false. Have I forgotten something?
(BTW: a1.equals( a1 ) is true)

Thanks
Paul Ramsden


********************

ARBURG GmbH + Co
Paul Ramsden
DV (Extern)
Arthur-Hehl-Strasse
D-72290 Lossburg
Tel.: +49 (0) 7446 33-3144
Fax.: +49 (0) 7446 33-3184
mailto:paul_ramsden@arburg.com
http://www.arburg.com




More information about the jdom-interest mailing list