Why is it necessary to make the block synchronized while iteratiing

Why is it necessary to make the block synchronized while iteratiing thru Synchronization Wrappers?
here is the code sample for same:
Collection c = Collections.synchronizedCollection(myCollection);
synchronized(c) {
Iterator i = c.iterator(); // Must be in synchronized block!
while (i.hasNext())
foo(i.next());
}

If at the first place I am getting all the methods synchronized by calling
Collection c = Collections.synchronizedCollection(myCollection);
that means no two threads can enter the data structure of this collection, I am not getting how ConcurrentModificationException will be thrown while iterating thru this collection?
Can u please explain in a little depth?

Similar Messages

  • Why can't you guys make the name bit short/stylish...

    I am very much impressed with the new SKYPE for Business look and feel. And am using this for business purposes regularly ..  But what i don't like is its long name..why can't you guys make the name bit short/stylish/convenient ?..will be difficult to say every time that i am using "Skype for business....."..  Please make these short and impressive !!!..

    Thank you for your feedback! I will pass this on internally.
    What are your thoughts about this forum? Let us know by doing this short survey.

  • Another control is blocking the control. Please make the blocked control visible and retry the action

    I am trying to click on a Hyperlink in div tag , but I keep getting this error message:
    Another control is blocking the control. Please make the blocked control visible and retry the action.
    What could it be?  Nothing is blocking it  at all.

    Check your html to see whether any controls are inadvertantly floating over the top of your hyperlink.
    I would also use firebug (F12 in ie or chrome) to highlight the boundaries of each control on your page so you can track it down easily.
    If using chrome you can right click on the page and select Inspect element.
    This should help you find the cause of the issue:)

  • The fan is very audible, and then winds down to almost quiet - why? how do i make the fans be quiet?

    the fan is very audible, and then winds down to almost quiet - why? how do i make the fans be quiet?

    hi, re my fans, this issue is about 1 week old and the machine is behaving normally.  However...the bottom of the machine is quite hot (but it has always been quite warm) and I do have my battery settings in preferences set to high performance (uses more memory.)  Also, I often stream video thru Firefox while working on medium/large Photoshop Docs as well as leaving ITunes or Preview open in the background.  Also, I leave my MacBook on continually...it's 3 years old...should I be concerned?  Is this issue indicitive of a battery problem or Sudden Computer Death Syndrome?

  • How to make the screen dim while music is playing

    I can't get the screen to dim while playing music on my iPod Nano.  It used to be that the screen dimmed while music was playing until it lit up when I hit a button to change volume, track, etc.  This preserved the battery life.  It seems that I inadvertantly changed some setting just a few days ago because I saw the apple logo appear on the screen and since then have not been able to figure out how to make the screen dim while playing music.  I think the fact that the screen is staying on while I'm listening now is making the battery out very quickly.  Does anyone know how to solve this problem?  Thank you!

    Hello ZingMA,
    You need to reset the backlight timer.
    Go to settings, general, and backlight. You should be able to set if from there. I am assuming you have a 6th gen nano. If you have a different model the user manuals have the steps. Found here:
    iPod nanos
    Hope this helps.
    ~Julian

  • Why won't simple dissolves make the round trip back to FCP?

    I have read in the Color manual and in certain places (here and the COW), that simple video transitions should be able to make the round trip back from Color to Final Cut Pro.  I have a video that I prepped for Color, only it does contain a few cross dissolves.  Everything is on one track, and the grading is done.  I see my dissolves in the Color timeline.  When I go back to FCP, however, they are gone.  Obviously, with there being no handles on Color video, I can't add them later.
    I understand that I could send the clips I want to perform dissolves on with handles over to color, grade them, and send them back and THEN make the dissolve, but this would be an elaborate waste of time.  Is there a setting somewhere that I'm overlooking?  Why, when all indications are that it will work, will it not work?
    Any input would save me from re-doing this whole edit.
    Thanks.
    Stats:  Running Final Cut Studio 2
                Mac Pro
                FCP version 7.0.3
                Color version 1.5.3
    All clips involved in this edit were QT at MPEG-2 Video, Linear PCM, Timecode
    Dimensions 1280x720
    Let me know if you need more info.

    Color doesn't work with MPEG-2 video.  It works with FCP codecs...  ProRes, DVCPRO HD, HDV, XDCAM.  And only renders out as ProRes or Uncompressed.  I've done over 100 onlines using Color, and every one of them kept the transitions intact.  Every one.  The fact that it isn't for you, means you are doing something wrong...and your codec is the obvious culprit.

  • Why it is necessary to make red while deleting a record?

    somecase we have to do it forcibly
    in case of full load making red while deleting is not compulsory
    but in case of delta it is mandetory

    Hi ,
    If there si a delta load from source to target system then as soon as the records are read from source and transferred to target to target the data mart status of that particular request(which contains the records) is set to the transferred and next delta is read after wards from that request. However if the request is not made red before delting it the system thins that the data has already reached the target and the next delta load will miss those records which actually have not reached the target.
    Hence for delta loads its compulsory to make the request RED bfore deleting it. However in the Full Load case every timem the data load is done all the records are transferred from source to target. Hence even if the records are erroneous in the target they get overwritten by the new correct records. So its not mandatory in this case(but in some special scenarios we may require to mark it red before deleting it like if teh request being deleted is the old request of the cube).
    Navesh

  • Why does Quick Select tool make the edges all jagged?

    My Photoshop Elements Quick Select tool is great for selecting an item, a shirt say, and then I copy it and paste it onto a new page with a white background, thus eliminating the background I had before.  The only thing is that it makes the edges of the item all jagged and then I have to go with the eraser tool and smooth everything out.  This is not easy because my hand is not that steady.  Also it is very hard on my eyes.  I've already had to get new glasses.   The original image, a shirt for example, has sharp delineation all around it.  How can I copy it so that when I paste it onto a new background, it stays sharp and I don't have to spend ages, sometimes half an hour or more, trying to smooth out its edges?  Thanks.

    Hi Barbara,
    Thanks for your answer about using Refine Edge.  It works very well.  Thanks so much.  Is there a way that I can get the edge really sharp but not jagged?  I've tried Smooth 8 and Feather 0 but the garment still doesn't have as sharp an edge as the original photo.
    Many thanks also for your answer to Jane regarding Fill or Unfill Workspace.  I couldn't find it even after a laborious task of copying every option screen in my original Photoshop Elements 6 and then comparing each photo to every option screen on my new Photoshop.  It never would have occurred to me to look in Application Frame.  I, like Jane and others, do not like working with my entire Workspace blacked out.
    Thanks again.   Would you have a suggestion re. my first paragraph herein?  Thanks.

  • Why is it necessary to have the boilerplate text in every email?

    This one:
    >This message was sent to: p taz
    >To post a reply to the thread message, either reply to this email (recommended) or visit the message page: http://forums.adobe.com/message
    >/1906449#1906449
    >If you post by replying to this email, be sure to leave the square-bracketed text at the end of the subject line as it is. This will help ensure that >your message is posted correctly.
    Firstly, it just highlights the dodgy-looking thing with the subject line, and secondly, I usually automatically flag any post with my name in it in case I need to respond to someone but now EVERY email that comes in gets flagged and I cannot (automatically) differentiate between high and low priority emails.
    Really, guys, was there a point to that or did the page just look too empty!  Of course I know who you posted it to, I am reading it!!!!!!

    If at the first place I am getting all the methods synchronized by calling
    Collection c = Collections.synchronizedCollection(myCollection);
    that means no two threads can enter the data structure of this collection, I am not getting how ConcurrentModificationException will be thrown while iterating thru this collection?
    Can u please explain in a little depth?

  • Why won't my keyboard make the clicking noise?? The dial pad doesn't do it either.

    For some reason the clicking wont make a sound!! Help!!

    Do you have Keyboard Clicks set to On in Settings>Sounds (at the bottom)?

  • Why won't my iPhone make the chime when I plug it in to the wall???

    My iPhone will not chime when I plug it in the wall and it doesn't show the symbol in the right hand corner but it charges. Can somebody please help me figure this problem out? Thanks!!!

    Reboot your phone, see if that fixes the problem. Try and power your phone off and then plug it into the charger.

  • Bought my ipod touch 4g from apple's official reseller on 21st November 2012. Purchase slip says warranty ends on 20th November 2013. But apple website says its 19th November 2013. Why? I went out of the store once while buying, was the ipod exchanged?

    Bought my ipod touch 4g from apple's official reseller on 21st November 2012. Purchase slip says warranty ends on 20th November 2013. But apple website says its 19th November 2013 when I put in my ipod's serial number. Why is that? When I bought the ipod, the salesman told me that the latest ios is not installed, so I typed in my apple id and passowrd  and opened the ipod, then they started donwloading the latest ios. During the download, I went out of the store for sometime, then i got back after 10 minutes and had to put my id/password again to begin with the new ios. Was my ipod exchange within this time? Why in a computerized system, If  I have bought an ipod on 21st November 2012, it says the warranty expires on 19th Novembner 2013? Pleasse help, my ipoid even had some scratch on the backside when I first  checked the back side after bringing it home from the store.

    Was my ipod exchange within this time?
    Not unless it was found to be defective, and that would not reset the warranty on the original serial number.
    Why in a computerized system, If  I have bought an ipod on 21st November 2012, it says the warranty expires on 19th Novembner 2013?
    Sometimes it's just wrong. Perhaps the reseller entered in the sales date incorrectly. Call Apple support and discuss the problem with them. They may ask you to fax them a copy of your receipt.
    my ipoid even had some scratch on the backside when I first  checked the back side after bringing it home from the store.
    You'll probably have difficulty convincing them that the scratch wasn't there when you brought it in, but you can go back to the store and talk to them about it.
    Regards

  • Satellite L200: Why LCD freezes and lines in the LCD appear while charging?

    Hi!
    I'm new here and ive got some problems with my L200. Everytime i charge my laptop while using it my LCD monitor freezes and there's a bit of running lines that appear in the monitor.
    The only way that i can use it is to disconnect the charger and run it thru the use of a fully charged battery.
    I just want to ask if theres a problem with my LCD or with the adaptor charger?
    Thank you so much!

    Everytime i inserted the adaptor it turns off and sometimes it freezes the whole screen and apparently some vertical lines appear on the screen. It's been two weeks and im using it right now thru a fully charged battery. Thank you so much for the reply.

  • Creating an Account on Azure... Why is it necessary to give any credit card information? Do they charge something?

    Hi,
    I am new to cloud and find azure good to work with clouds. But I was trying to create trial an account there and it is asking for credit card. Please tell me if this is trial then why it is necessary to give the card details? Moreover, being a trial version,
    many of us don't have any cards these days. So till that time we have to wait for the card? Please provide some facility to learn and give some period of trial without any card details.
    Thanking you.
    Regards,
    Syed

    Hi,
    Please have a look at Azure free trial FAQ:
    http://azure.microsoft.com/en-gb/pricing/free-trial-faq/, We use the phone number and credit card for identity verification. We want to make sure that real people are using Azure. We
    do not bill anything on the credit card. So, please wait for the card. If you are a student and don't have a card, please try this link:
    http://www.WindowsAzurePass.com/azureu, refer to
    http://blogs.msdn.com/b/mast/archive/2013/10/12/windows-azure-30-day-s-free-trial-uncovered.aspx for more details.
    Best Regards,
    Jambor
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Is there a way to make the audio continue when the page is turned?

    Can I make the audio continue while a reader turns pages in iBook? With everything I've tried the music shuts off as soon as the page is turned. Thanks for any insight.
    a1foster

    Latest: Working in Pages actually seems to work for this! Place the audio file in Pages (drag and drop works just fine), make sure the audio is inline (not floating) export Pages to ePub and run the Book Proofer . . .  once you click to start the audio, the audio plays until the end, regardless of where you are in the book, it keeps playing. Minor victory because you loose a bit of the layout features that iBook Author has, but the audio now functions the way I was hoping.

Maybe you are looking for

  • [SOLVED]Mounting usb drives "not authorized" with thunar-volman (XFCE)

    Hi, I'm new to Arch (even though I must be approximately at my 15th try at installing it properly) and I have a problem with thunar-volman. Whenever I log in as user, and try to mount a usb drive with thunar, let's say I want to plug a drive labeled

  • Cable for iphone 4 video to tv

    I can not get anything but audio when I hook iphone 4 to tv using Apple video cable?? What's the trick?

  • How can I merge cells and set their row hight in numbers with applescript

    Hi, I have a table in numbers that looks like this (but without header): Column A 1 1 ABC GHDD 2 efgh dhdh 3 lmnk hdjdhj 4 5 2 HGJKSKJHD 6 HKD KIEIJE JEIj 7 G8DIHE  EO E PE 8 GDDH OEJ EEF 9 10 3 DHKJDH  D JH D KJH D 11 I want to merge all the cells t

  • An unknown error has occurred (-50)

    The pop up states 'There was a problem downloading "Miss Congeniality". An unknown error occured (-50). Please check that the connection to the network is active and try again.' The network is connected because I am online posting this message, the i

  • AHT begins to load, ejects disc, crashes.

    Hello- I'm having some issues with running AHT on my Early 2008 Mac Pro so I can diagnose some USB port issues. It is running Lion 10.7.3, so I had to copy the .diagnostics folder from the original Install disc that shipped with the computer, to the