[jdom-interest] getText() returns null or ""
scott.willy at avisto.com
Thu Oct 5 05:20:13 PDT 2000
> -----Original Message-----
> From: jdom-interest-admin at jdom.org
> [mailto:jdom-interest-admin at jdom.org]On Behalf Of Laurent Bihanic
> Sent: Wednesday, 04 October, 2000 16:35
> To: jdom-interest at jdom.org
> Subject: Re: [jdom-interest] getText() returns null or ""
> On the performance side, a test against null is much faster than
> an equals()
> on strings.
In the general case, yes, but
if (foo.equals( "" ) )
is the same as
if ( foo.length() == 0 )
and the latter is as fast as a test against null (or as near as d*** it :-)
More information about the jdom-interest