When is stricly equal not equal?

at the end of a lengty debugging session, I have this situation
public dynamic class AA extends Array
     public function close():void
     {     this[this.length-1] = this[0];     // if the array describes a circular structure, the last element definitely should be the first one
the AA class members are, by design, instances of class A (or possibly A2 that extends A). In this case, they are definitely
class A
I call close(), and later verify that the first and last still seem to be identical (at least as far as A's toString() traces out)
In a different part of the program, I have
var aa:AA = ....
for(var i:int = 0 ; i < aa.length ; i++)
{     var a:A = aa[i];
     if(i != 0 && a == aa[0])
          break;     // ignore last element if it happens to be the "end" of a ring, rather than a chain
the == returned false.....
When I changed the code to use ===, the comparison returned true as expected.
Of course, both == and === define object equality the same way. So, what could be the difference?

Hi dmennenoh,
I was referring to these statements
-- description of == --
Variables representing objects, arrays, and functions are compared by reference. Two such variables are equal if they refer to the same object, array, or function. Two separate arrays are never considered equal, even if they have the same number of elements.
-- description of === --
The strict equality (===) operator is the same as the equality (==) operator in three ways:
Numbers and Boolean values are compared by value and are considered equal if they have the same value.
String expressions are equal if they have the same number of characters and the characters are identical.
Variables representing objects, arrays, and functions are compared by reference. Two such variables are equal if they refer to the same object, array, or function. Two separate arrays are never considered equal, even if they have the same number of elements.
I was trying to identify the reference created in function close

Similar Messages

  • Why should we overide hashCode method when we overide equals ?

    Why should we overide hashCode method when we overide equals ?

    java.lang.Swapnil wrote:
    Why should we overide hashCode method when we overide equals ?For the purpose of hashing, you need to override both hashcode and equal method. It is because different objects(in most cases) have different hashcode.
    Edited by: Hunky322 on 28.?ub.2009 16:21

  • In new iPad 4g, when sim card is not inserted, I can not find the enable 4g tap in the setting-cellular data tap, can some one please tell me if this is normal and if so, then when it appears, thanks

    In new iPad 4g, when sim card is not inserted, I can not find the enable 4g tap in the setting-cellular data tap, can some one please tell me if this is normal and if so, then when it appears, thanks

    If the SIM is out of your phone, find my phone needs a data connection, so could use wifi - IF in range of a wifi and one that it can join (ie. a known network or one that is wholly open so no login required).  Your phone could also simple be turned off, so not findable, or it may have been restored (plugged into iTunes and restored as new) again, making it permanently unfindable.  Honestly, for someone stealing an iPhone, this is likely the first thing they do - restore as new and it is theirs forever.
    Find my iPhone is tied to the users iCloud account - the find function is part of the iCloud account's services and it communicates with the iCloud servers over a data connection - either wifi or 3G.
    Have you set up your iCloud account on your replacement phone, and is it working properly on that phone?

  • When i go to sing into apple id it says "We apologize but we are unable to verify your account information online". When i go to "Not sure if you have an Apple ID?" It says "We apologize but we are unable to verify your account information online"

    When i go to sign into apple id it says "We apologize but we are unable to verify your account information online". When i go to "Not sure if you have an Apple ID?" It says "We apologize but we are unable to verify your account information online" When i try to sign in with my email it says "you already have an account????

    Might I suggest a password reset?
    Maybe you can click on the Reset Password link instead of trying to log in at appleid.apple.com.
    I'm not sure if that would work, but its worth a try.
    ~Lt. Leviathan

  • Error for open process order when BOM alternative is not found

    Dear colleagues,
    When I open process order. BOM alternative is selected according to the production version. But when  BOM alternative is not found system gives only information message and I can open process order, I want to prevent open process order when there is no BOM alternative according to the production version. Because the Bom can be deleted after creation production version.
    Thanks for your helping,

    Hi,
    U need to use an enhancement at the creation of order to check the active status of the bom and restricting the order creation when BOM status is inactive.
    see whether following enhancement is useful for your scenario:
    PPCO0006 Enhancement & EXIT_SAPLCOZF_003
    Please confirm.
    Regards
    Suri

  • When my iphone4 is locked and I get a message, the sound does not go off when my phone is not on silent there fore i do not know when i have a message. Help?

    So my iphone 4 is about 2 years old. Whenever I receive a message, my phone does not vibrate or make a sound. This happens even when my phone is not on silent, I dont know why this has happened. However when I receive a call, my phone goes off. I dont know why this happens. Am i the only one that's experienced this?

    Yes i have, and its all set to be fine. When my phone is unlocked all the sounds work, it's only when it is locked

  • Ask your question.please help itunes will not launch on my computer the icon on desktop has changed to a white folder no error message appears and it appears but then disappears in task manager when the programme will not open quick time is working

    please help i need to fix my itunes it will not launch on my computer . no error message appears it simply will not run. the icon on desktop has changed to a white folder and it still appears in programmes in start menu but will not open. it appears in task manager but disappears when the programme will not open

    You music etc should not be affected by problems with the iTunes program, nevertheless it is always a good idea to backup your data.
    You haven't said if there was any error message when you tried to start iTunes. If  there was one please give it in full.
    Also check to see if QuickTime works, iTunes can not work without it. If QuickTime doesn't work, it has to be fixed before worrying about iTunes.
    Then restart your PC and open your Task manger and select the Processes tab.
    Try to start iTunes, does iTunes.exe appear on the processes tab? If so does it disappear again or remain although the programs does not open?

  • I have bought an iMAC second hand but when updates to purchased (not by me) Apps I cannot download the updates as it is asking for the original owners password. How can I amend this or could I delete the Apps and download new ones in place under my email

    I have bought an iMAC second hand but when updates to purchased (not by me) Apps I cannot download the updates as it is asking for the original owners password. How can I amend this or could I delete the Apps and download new ones in place under my email

    If the machine was upgraded to Lion 10.7.x by the original owner then you bought an illegal license of Lion and also of any other applications that the seller  said came pre-installed, this assumes the seller did not include original install media. In that case you need to contact the seller for the original install DVDs that came with the machine re-install up to Snow Leopard 10.6.8 and then purchase Mountain Lion ($20) and the applications you want or need. If the seller cannot come up with the original install discs then you can buy them from a nominal cost from AppleCare..

  • How am i ment to use "find my i phone" when my iphone has not yet got icloud on it. What a waste of an app. Now need to get a new phone.

    How am i ment to use "find my i phone" when my iphone has not yet got icloud on it. What a waste of an app. Now need to get a new phone.

    Easy... you install the Find My iPhone app >  http://itunes.apple.com/us/app/find-my-iphone/id376101648?mt=8
    You can use that app without iCloud and you don't need a new iPhone.
    Read here >  Apple - iPhone - How to set up Find My iPhone

  • How can I be certain the contact list in my iPod touch updates my computer Outlook contact list when I sync and not go the other way? The options in iTunes are not specific enough.

    How can I be certain the contact list in my iPod touch updates my computer Outlook contact list when I sync and not go the other way? The options in iTunes are not specific enough. In other words, I want to replace the information in my computer Outlook contact list with the data from my iPod touch. 

    How is your iPod configured to sync music from your iTunes library?  In other words, what options and configurations do you have enabled from under the iPod's Summary and Music configuration panes in iTunes?
    B-rock

  • Re: Why can't I have a raincheck when the ad does not say limited quantities?

    Not the same person, but is it possible to get a rain check for this deal whether it is online or in store? The games I wanted to buy are out in both options.

    Hello everyone,
    This promotion created some serious demand for the games involved. However, it also created some confusion around the topic of rainchecks. I apologize if this confusion made for a poor experience for any of you while trying to take advantage of this offer. In this post, I hope to shed some light on this for all of you.
    I understand that since we did not specifically call out in our weekly ad insert whether or not this promotion qualified for rainchecks, it was somewhat ambiguous to anyone that hasn’t dealt with this specific situation before. One of the exclusions to a raincheck is when the model is not specifically advertised with a price (e.g., “All TVs on Sale”). In this case, it was advertised, “Buy One Get One Free on these 3DS titles”. I am very sorry to hear that this might not have been explained to you by the store.
    We are grateful for you interest in this promotion and your desire to bring us your business. Please let us know if you have other questions or concerns.
    Best regards,
    JD|Social Media Specialist | Best Buy® Corporate
     Private Message

  • How can I throw a hard 404 error to apache when a JSP is not found.

    How can I throw a hard 404 error to apache when a JSP is not found.
    I want to let apache handle the error.

    [email protected] (Jeremy Conner) wrote in
              <[email protected]>:
              >How can I throw a hard 404 error to apache when a JSP is not found.
              >I want to let apache handle the error.
              >
              >
              First thought that comes to mind is to return HTML that tells the browser
              redirect to a nonexistent file under Apache. You can't tell Apache to
              throw a 404 unless you're in a mod. Maybe something they could add to the
              proxy, but until then, I think a redirection in the response HTML is your
              only option.
              Jesse
              

  • I Hate Bing and when I click on a Firefox NEW Tab and search I keep getting Bing results, I used to get Google which I would like back, my homepage when opening Firefox is not Bing but all tab searches retrieve Bing results.

    My homepage when opening Firefox is not Bing, yet for some reason today it started using Bing instead of Google for my NEW tab search results. I already deleted Bing from the search bar, no results. Deleted Bing from my computer's control panel. I just want to be able to click a new tab and have my results in google as I always have.

    hello, you have a malicious addon present on your pc. <br>please go to ''firefox > addons > extensions'' & remove ''LyricsParty''.
    also go to the windows control panel / programs and remove all toolbars or potentially unwanted software from there and run a full scan of your system with the security software that you have in place and different other tools like the [http://www.malwarebytes.org/products/malwarebytes_free free version of malwarebytes] & [http://www.bleepingcomputer.com/download/adwcleaner/ adwcleaner].
    [[Troubleshoot Firefox issues caused by malware]]

  • When I connect my iphone to my mac it says itunes will not work with my iphone cause it needs version 10.6.3 itunes,. problem is i have no idea how to down load that to my iphone when my mac will not connet to it cause it nees the down load help please

    when I connect my iphone to my mac it says itunes will not work with my iphone cause it needs version 10.6.3 itunes,. problem is i have no idea how to down load that to my iphone when my mac will not connet to it cause it nees the down load help please

    Ive got the same problem, just got my iphone unlocked, and they told me to sync it to itunes to get it permently unlocked, well everytime i plug my iphone in it says; it wont work as it needs up dating to 10.6.3, which i have already updated, but still doesnt work, so how can i get my phone unlocked?

  • I get an error message when downloading ITunes :could not access the network location %public%\desktop\

    I get an error message when downloading ITunes "could not access the network location" %public%\desktop\?
    windows vista 32 bit

    Try the following user tip:
    "Could not access network location %PUBLIC%\Desktop\" install errors

Maybe you are looking for

  • Error Message "Delete price or set "Invoice Expected Indicator" in PO.

    Hi Gurus, We are in extended classic scenario with version 5.0. We are getting error message "Delete price or set "Invoice Expected Indicator" when we are releasing the PO from Release PO option. We are getting this error message in below situation:

  • ATI HD3400 in Lenovo T400: xf86-video-ati from testing docking issues

    Hi everyone, I have a Lenovo T400 which I exclusively use with the discrete ATI HD3400 graphics chip because I need the DVI output from my Lenovo Advanced Mini Dock to drive a large display. When I recently updated to xf86-video-ati 6.9.0.91-1 (from

  • Export quality for desktop viewing:

    I am using PPCS3 to export a short movie (5 minutes) that I would like to ONLY show on my desktop. My desktop resolution is 1280 x 800 pixels. When I export the movie using MPEG (NTSC High Quality - Lower Field), the quality of the full screen DVD us

  • Copernicus crashes when after adding certain fields to a Webservice

    Hi Everybody, I am having a frustrating issue that is causing Copernicus to crash whenever I add certain fields to a Web service. For instance, if I create a web service for the ServiceRequest BO, and include the TextCollection field, once it is save

  • Mountain Lion download from Apple

    I would like to hear form anyone who has downloed Mountain Lion, when the download is completed is there any method of verification for the downloaded operating system? Example is there a verification software, MD5 Hash,etc.. to confirm the download