Chris Mcgarel wrote:
>
> Can someone expalin to a novice why I must use:
>          if (Request.Form("myFormElement").equals("myString"))
> rather than a straight comparison operator:
>         if (Request.Form("myFormElement")=="myString")
> ?

The "==" operator tests for equality of _objects_. It only returns true
if both references are equal.

The "equals" method of the String class tests for equality of _content_.
It returns true if the characters match up.

Vance

Vance Christiaanse
[EMAIL PROTECTED]
TextWise, LLC

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html

Reply via email to