Article View: borland.public.jbuilder.java.language
Article #18724Re: compare to string
From: Steven Greenberg
Date: Tue, 05 May 1998 00:00
Date: Tue, 05 May 1998 00:00
20 lines
1111 bytes
1111 bytes
It's kind of hard to tell what you're doing from that little snippet, but I
think the not "!" operator is taking precedence over the method call
(.equals).
Either do the comparison without the not and change what's running in the
curly braces to get what you need, or use parentheses to make sure the
expression is evaluated the way you expect.
if (!(tNom.equals(leNom)))
{....}
stephanie provost wrote in message <354E2436.8360B219@netc.net>...
>hi,
> I want to compare to string ,
> doesnt work -> if (!tNom.equals(leNom))
> {....}
>
>thanks.
>
Technical Details
Message-ID:
<6in0so$dd7@forums.borland.com>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<354E2436.8360B219@netc.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f74b3,3a1f736ee7210a19 X-Google-Attributes: gidf74b3,public From: "Steven Greenberg" <steveg@aiwaraid.com> Subject: Re: compare to string Date: 1998/05/05 Message-ID: <6in0so$dd7@forums.borland.com> X-Deja-AN: 350421228 References: <354E2436.8360B219@netc.net> X-Mimeole: Produced By Microsoft MimeOLE V4.72.2106.4 Organization: Another Netscape Collabra Server User Newsgroups: borland.public.jbuilder.java.language