--Original Message-
From: Aaron Prohaska [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 07, 2000 3:34 PM
To: [EMAIL PROTECTED]
Subject: Re: Problem with if statement
Thanks everyone. I actually used key.equalsIgnoreCase("AT") and its works
perfectly.
Aaron
o this
> if(key.equals("AT").
>
>
> Hope this helps.
>
>
>
> >From: Aaron Prohaska <[EMAIL PROTECTED]>
> >Reply-To: A mailing list about Java Server Pages specification and
> > reference <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
>
want to compare for values then u have to use equals()
method of the Object class like this..
if(key.equals("AT")
{
...
}
As i think it will help u
If not pl revert back.
Peeyush Bansal
Application developer
IBM, Delhi
___
there might be some extra non-printable characters in the key
-Original Message-
From: maurice coyle [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 08, 2000 1:12 AM
To: [EMAIL PROTECTED]
Subject: Re: Problem with if statement
maybe you should try
if(key.equalsIgnoreCase(&qu
maybe you should try
if(key.equalsIgnoreCase("AT"){
...
}
works for me.
maurice
Aaron Prohaska wrote:
>
> I am trying to do something based on if key is equal to "AT", but I am not
> getting any results. It acts as if key is not equal to "AT", but I can use
> out.println(key) get "AT". Does any
Strings are not compared using == in Java
Use String.equals("another string")as Jeniffer pointed out
- Original Message -
From: Jennifer Buffington <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, September 07, 2000 3:12 PM
Subject: Re: Pro
Aaron Prohaska wrote:
>
> Thanks everyone. I actually used key.equalsIgnoreCase("AT") and its works
> perfectly.
One problem might show up with the above code. If you don't check
whether key is not null, then NullPointerException will be thrown. Thus,
following Java FAQ, you should write somethin
-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Tim Pierce
Sent: Thursday, September 07, 2000 12:16 PM
To: [EMAIL PROTECTED]
Subject: Re: [JSP-INTEREST] Problem with if statement
try this:
if (key.equals("AT")) {
// do so
try this:
if (key.equals("AT")) {
// do something
}
-Original Message-
From: Aaron Prohaska [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 07, 2000 1:40 PM
To: [EMAIL PROTECTED]
Subject: Problem with if statement
I am trying to do something based on if key is equal to
This is a java problem...
try
if (key.equals("AT") {
... do something...
}
Look up the difference between == and equals.
-Original Message-
From: Aaron Prohaska [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 07, 2000 11:40 AM
To: [EMAIL PROTECTED]
Subject: Probl
s original
dimension." --Oliver Wendell Holmes
-Original Message-
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Aaron Prohaska
Sent: Thursday, September 07, 2000 1:40 PM
To: [EMAIL PROTECTED]
Subject: Problem with if stat
Use
if (key.equals("AT"))
I think these type of question go to general Java mailing list? This list should
have only JSP related issues.
Thanks
- Kamal.
Aaron Prohaska wrote:
> I am trying to do something based on if key is equal to "AT", but I am not
> getting any results. It acts as if key i
t about Java Server Pages specification and
> > reference <[EMAIL PROTECTED]>
> >To: [EMAIL PROTECTED]
> >Subject: Problem with if statement
> >Date: Thu, 7 Sep 2000 11:39:30 -0700
> >
> >I am trying to do something based on if key is equal to "AT&
PROTECTED]]
Sent: Thursday, September 07, 2000 11:39 AM
To: [EMAIL PROTECTED]
Subject: Problem with if statement
I am trying to do something based on if key is equal to "AT", but I am not
getting any results. It acts as if key is not equal to "AT", but I can use
out.println(key)
Aaron,
I think you have to use something like this:
if (key.equals("AT"){
...do something...
}
because (supposed) key is a string.
Yi
Aaron Prohaska wrote:
> I am trying to do something based on if key is equal to "AT", but I am not
> getting any results. It acts as if key is not equal to "A
>To: [EMAIL PROTECTED]
>Subject: Problem with if statement
>Date: Thu, 7 Sep 2000 11:39:30 -0700
>
>I am trying to do something based on if key is equal to "AT", but I am not
>getting any results. It acts as if key is not equal to "AT", but I can use
>out.println(k
I am trying to do something based on if key is equal to "AT", but I am not
getting any results. It acts as if key is not equal to "AT", but I can use
out.println(key) get "AT". Does anyone know why this might not be working?
if (key == "AT") {
..do something...
}
thanks,
Aaron
17 matches
Mail list logo