-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chuck,
Caldarale, Charles R wrote:
>> From: Christopher Schultz [mailto:[EMAIL PROTECTED]
>> Subject: Re: [OT] "if" don't work?!?!?
>>
>> String Pippo = "on";
>>
>> if(Pippo == "on&q
> From: Christopher Schultz [mailto:[EMAIL PROTECTED]
> Subject: Re: [OT] "if" don't work?!?!?
>
> String Pippo = "on";
>
> if(Pippo == "on")
>System.err.println("Pippo is on, man!");
Again, that's not what th
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chuck,
Caldarale, Charles R wrote:
>> From: Massimiliano PASQUALONI
>> [mailto:[EMAIL PROTECTED]
>> Subject: "if" don't work?!?!?
>>
>>if (Pippo == "on") {
>
> Guaranteed to be false.
Not always:
String Pippo = "on";
if(Pippo == "on")
Sys
> From: Jost Richstein [mailto:[EMAIL PROTECTED]
> Subject: Re: [OT] "if" don't work?!?!?
>
> No, that is not guaranteed to be false.
> For example
>Pippo.intern() == Pluto.intern()
> should be true.
The above certainly is correct, but is not
No, that is not guaranteed to be false.
For example
Pippo.intern() == Pluto.intern()
should be true.
Caldarale, Charles R schrieb:
From: Massimiliano PASQUALONI
[mailto:[EMAIL PROTECTED]
Subject: "if" don't work?!?!?
if (Pippo == "on") {
Guaranteed to be false.
Pippo =
This is not really a Tomcat question, but a matter of Java language
understanding.
Comparators like ==, >, <=, etc. should only be used with java language
primitive types, such as int, byte, boolean, and NOT with Objects, like
String, as you are, UNLESS you actually wish to test whether the two
> From: Massimiliano PASQUALONI
> [mailto:[EMAIL PROTECTED]
> Subject: "if" don't work?!?!?
>
>if (Pippo == "on") {
Guaranteed to be false.
> Pippo = request.getParameter("abilitato");
> Pluto = request.getParameter("abilitato");
>
> the if (Pippo == Pluto ) don't work!
Also