One probably does what you expect, and the other doesn't. That's a HUGE
advantage for .equals().


>From: Chad Gray <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: .equals v.s. ==
>Date: Wed, 19 Dec 2001 08:51:20 -0500
>
>What is the difference between these two?  Advantages?  Disadvantages?
>
>if (colors == "colorchart")
>
>if (colors.equals("colorchart"))
>
>===========================================================================
>To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
>JSP-INTEREST".
>For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
>DIGEST".
>Some relevant FAQs on JSP/Servlets can be found at:
>
>http://archives.java.sun.com/jsp-interest.html
>http://java.sun.com/products/jsp/faq.html
>http://www.esperanto.org.nz/jsp/jspfaq.jsp
>http://www.jguru.com/faq/index.jsp
>http://www.jspinsider.com




---------------------------------------------------
Joseph B. Ottinger               [EMAIL PROTECTED]
http://adjacency.org                  IT Consultant


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to