What will happen with the code?

What will happen with the code below?
for (i=0; i<=10000; i++)
Object[] obj = new Object[5];
In every loop, a new Array of Object wll be created. Will the Array of Object created in the
current loop( for example, i=2001), eliminate the Array of Object created in previous loop
(for example, i=2000 or 1999)? How the memory is allocated in every loop?
Thanks.

Each time through the loop, an array of five Object references is created. A reference to this array is assigned to the reference variable obj, causing the previously allocated array to be unreachable (except the first time through the loop, if obj was originally null). The garbage collector will collect these unreachable arrays if the memory gets low.

Similar Messages

  • So, when will the networks allow 99 cent tv rentals?  I think the first Apple TV has so much more to chose from.  What will happen with the Apple TV 2?

    Anyone know what will be the outcome of Apple TV 2 as far as being able to rent shows from all networks?  You can get just about anything on the first apple tv.

    TV rentals were not and are unlikely to ever be available on AppleTV 1 (although I think in some ways it is still better than AppleTV2).
    Other than for direct purchasing as opposed to renting I've not noticed that much difference in content availability but our content is relatively poor anyway in UK compared to US, especially in terms of pricing.
    AC

  • What will happen with the richer functionalities of Deski if Webi replaces?

    Hello,
    I have been told that Webi will replace Deski because Deski is not supported anymore. for that we developed a lot of new reports in Webi and we encourage our customers to do the same. When our customers try this new tool out (Webi) they miss a lot of the functionality they had with Deski and are not willing to change. For instance in Deski the graphics possibilities are much bigger if you want to combine more datasources on one graph. Or also the grouping functionality when inserting a new variable is also missing. For the first example we could say that this can be solved by Crystal reports and for the other you can link excel files to your webi but these are workarounds for our customers and they want added functionality in the Webi tool of course. Is this planned or are there other means that I don't know of to solve those questions in Webi?
    thanks for your answer.
    Thierry renaer

    Thierry,
    Jvmauricio's reply is spot on (both are reporting tools of their own, you should only know what to use when).
    One item you mentioned:
    the grouping functionality when inserting a new variable is also missing
    has a different syntax, however, the results are the same.  Here is an example:
    You have a data set with various ages and a metric.  You would like to group the ages into a group and summarize.  Your report variable is called AGE, so here goes to get Ages 0-3, 4-8, and 9 and above:
    =if([AGE] between (0;3);"Ages 0-3";if([AGE] between (4;8);"Ages 4-8";"9 and above"))
    So, you use the "if function" and the example above uses the nested-if type of construct.  I've never used DeskI, so I have a poor reference point on ease or difficulty over one tool or another.  From an administrative point of view, if you can get users up and running quickly over the web using a java-enabled browser versus loading a software package then I think it is a step forward.  Also, the web-enabled version, providing the correct security is in-place, permits a user to develop/run reports any where an Internet connection is available, but not so with DeskI.  One of your stragegies might be to identify like capabilities between the two tools, then show your users the "new way", like group or if, etc, etc.-- Just my two cents worth.
    Thanks,
    John

  • If I reinstall my computer what will happen with itunes

    I am going to buy a new hard disc for my computer anb I amb going to teinstall the operating system, what will happen with the itunes cionnection?

    I do not understand yur question. Please provide more information.

  • If I buy a MacBook pro now, what will happen with it once the Lion OS makes it's appearance? Will I need to buy a new one again?

    If I buy a MacBook pro now, what will happen with it once the Lion OS makes it's appearance? Will I need to buy a new one again?

    Lion will run on most Intel machines. It will not run on the following machines:
    MacBook Pro (sold before October 2006)
    MacBook (sold before November 2006)
    Mac Mini (sold before August 2007)
    iMac (sold before September 2006)
    It requires an Intel Core 2 Duo (or later CPU). Those machines listed above were all Intel Core Duo machines and with the exception of one of the Mac Minis, an Intel Core Solo. So we're talking 4+ year old machines. I have not tested Lion on a machine with anything less than 2GB of RAM.
    Wikipedia has a pretty good public summation of what's known so far and it's quite accurate - http://en.wikipedia.org/wiki/Mac_OS_X_Lion
    The biggest thing of note so far is that you cannot install/run Rosetta. Which maybe problematic for some users.

  • Migration Planning: What will happen with clients when changing namespace?

    Hello,
    We are planning to upgrade our EX2010 enviroment to EX2013.
    Sadly our namespace in EX2010 is right now owa2.domain.com. The name owa2 is coming from last migration between ex2003 and ex2010. I'd like to remove this minor flaw if possible.
    But what will happen with all the clients and mobile devices which are right now bound to owa2.domain.com? Is it possible to change the name back to owa.domain.com without manual interaction with the clients?
    Kind Regards

    Hi ,
    Based on my knowledge for services like pop,imap and active sync we need to have the manual interaction.Without manual intercation we cannot achieve this.
    Same time we need to have the new name on the SAN certificate .
    For owa users you can simply communicate the new url via email and then for internal outlook and external outlook connectivity we need to repair the profiles to force the autodiscover service to fetch up the new name.On my experience most of the times repair
    will not help.So again your only hope would be reconfiguring the existing profiles.
    Note : Most importantly before renaming the host A record on the external and internal dns all you need is to reduce the TTL value for the existing host A record on the name owa2.domain.com.So
    that external and internal clients will not have the dns cache for a long period.
    Anyhow we will wait for some expert inputs on this case.Because their ideas might be good and different than me.
    Thanks & Regards S.Nithyanandham

  • What will happen to the thread ?

    Thread t = new Thread(); t.start(); t = null; now what will happen to the created thread?

    Except of course that Thread's run() method is either abstract or does nothing, so that will either not compile, or the thread will end as soon as it starts, at which point I believe the VM will release it and it will become eligible for GC.
    If you had a run() method that actually did something, then it would keep running until it was done, even with your t reference being null, as described in reply 1.

  • What will happen to the organization of library if I removed the songs from windows explorer? Will iTunes automatically updated without all the deleted songs, or it will indicate 'missing location'? Any fast ways to clear this 'missing location' songs?

    What will happen to the organization of library if I removed the songs from windows explorer?
    Background: I found it easier to identify duplicated songs in windows explorer as the songs will be renamed .... 1.mp3, thus enabling me to remove the duplicated songs; unlike in iTunes where I know the trick of showing duplicate songs, but you don't know which one is the one with 1 at the end of the file name.
    Will iTunes automatically update the library without all the deleted songs, or will it indicate 'missing location' songs? Any fast ways to clear this 'missing location' songs by highlighting them all and delete all at one go?
    Thanks.

    One way is to use iTunes Folder Watch with its option to check for dead tracks on start up.
    Another option is with a set of Lost & Found playlists.
    Lost & Found
    Create a playlist called Found, select everything in Music and drag it into the Found playlist. Create a smart playlist called Lost matching All the rules Playlist is Music and Playlist is not Found. Your lost tracks will be in this playlist. You can delete them all with a Ctrl-A to select them and Shift-Delete to remove them.
    You can then delete the Lost & Found playlists.
    tt2

  • When i hide some fields from the Editform using javascript, what will happen to the fields that hve been hidden

    I am working on an EnterpriseWiki site collection, and when users edit the page properties as follow:-
    then will get all the fields inside the EnterpriseWiki content type as follow:-
    now i want to hide all the fields except the ; Title & Name, so i edit the EditForm and i add the following script:-
    <script>
    $('#formTbl tr').filter(function ()
    return !$(".ms-standardheader", this).text().match(/Name|Title/i);
    }).remove();
    </script>
    so currently when users edit the wiki page properties they can only edit the Name & Title, because the script hide the other fields.
    My question is what will happen to the other values such as the page content, assign to , etc that have been hidden.. I test this and seems that when editing the name and title the other values will not get effected which is what i need, but not sure how
    did SharePoint handle this, i was afraid that hiding the other columns will set their values as null or empty if the user save the editform with only the title and name inside it ? can anyone adivce on this ?

    Hi John,
    From your description, my understanding is that you are worried about the values of some fields
     will been saved as empty if you hide them in EditForm.
    If you hide some fields in EditForm, it means that you could not edit them. These fields’ values will not be changed after editing Title field or Name field. When you click Save button, they will be still the values before changing the Title field or Name
    field.
    Best Regards,
    Vincent Han
    TechNet Community Support
    Please remember to mark the replies as answers if they help, and unmark the answers if they provide no help. If you have feedback for TechNet Support, contact
    [email protected]
    i found this very critical issue with hiding the fields from the edit form, now i wrote the following script inside the edit form , to hide all the fields except the Name
    <script>
    $(document).ready(function(){
    $('#formTbl tr').filter(function () {
    return !$(".ms-standardheader", this).text().match(/Name/i); }).hide();
    $('#ctl00_ctl40_g_6c7d849e_da6b_4138_be9f_b99bde542065_ctl00_ctl02_ctl00_ctl04_c‌ ​tl00_WebPartMaintenancePageLink').hide(); });
    </script>"
    . and now if I submit the editform (which only contain the Name) all the html tables inside the wiki page content will be removed.

  • I plan on reformatting my computer, what will happen with my ipod?

    I plan on reformatting my computer and was wondering what will happen with my ipod, will i hafto restore all of its songs and since ive saved the ipod and named it and everything will i hafto go through that proccess again? please explain?

    Hi,
    Please make sure that you should copy all the music back to your iTunes before you do the Syc with your iPod. Please read the following post
    http://discussions.apple.com/thread.jspa?threadID=250220&tstart=30

  • What will happen to the apple care of iphone 5

    i quick question, is iphone 5 gone? and what will happen to the iphone 5 apple care with a replaceable warranty?

    Of course AppleCare will still be there. Nothing will change

  • Testing Lightroom 5 - What will happen with my Lightroom 3 catalogue??

    I am currently working with Lightroom 3. What will happen with my catalogue file(s) if I start the test of Lightroom 5? Is it possible to switch bak to Lightroom 3 after testing without restore of the "old" Lightroom 3 catalogue?

    In short, Yes.
    When you install and launch LR5 it will find your catalog(s) and when it tries to open them it will promt you to approve conversion from 3 to 5.
    This will duplicate your catalog (not the assets) and leave your version 3 catalogs untouched.
    If you want to return to a version 3 catalog for some reason then you will simply open it with LR3 which will remain on your machine.
    Note that the newer features will not be available or readable by the version 3 catalogs. So if you make changes to a raw file using new tools those changes will not show when viewing the file in LR3 catalogs.
    To properly "test" LR5 for your purposes I recommend you catalog new files and not the existing ones you have until you are comfortable with LR5. When you are comfortable, then upgrade your current catalogs.

  • What will happen to the stuff in my keychain after today? I don't want iCloud. Can I keep the keychain? in my system?

    what will happen to the stuff in my keychain after today? I don't want iCloud. Can I keep the keychain in my system under lion? Can someone please help me?

    Thank you Sig. Well I keep all my passwords in my keychain. I'm concerned I'll lose them after today. I understand that keychain will be obsolete after today. I don't want icloud either, because I don't want all my personal info on a server. I want to keep my personal information in my system. Am I making any sense? Can you make any suggestions or offer any insights around this? 

  • What will happened in the excise while we sent free goods @ samples

    what will happened in the excise while we sent free goods @ samples

    Dear maha,
    What ever the Transactions(Except Exports)..you have to pay the Excise duty and Cess.
    Regards
    Luckky

  • What's wrong with the code?

    public void run()
    try
    {     for(;;)
         mgr = (RTPManager)RTPManager.newInstance();
         mgr.addSessionListener(this);
         mgr.addReceiveStreamListener(this);
         try{  /*****port1 = port2 = 29261, which port is only used in here
         localAddr = new SessionAddress(InetAddress.getLocalHost(), port1);
         destAddr = new SessionAddress(ipAddr, port2);
         }catch(Exception e)
              System.out.println(e + " 4");
         try{
         mgr.initialize(localAddr);
         }catch(Exception e)
         System.out.println(e + " 5");
         //set buffer
         bc = (BufferControl)mgr.getControl("javax.media.control.BufferControl");
         if (bc != null)
         bc.setBufferLength(20);
         try{
              mgr.addTarget(destAddr);
         }catch(Exception e)
         System.out.println(e + " 2");
    catch(Exception e)
         System.out.println(e+ " 3");
    the error when i run the code is like that:
    javax.media.rtp.InvalidSessionAddressException: Can't open local data port: 29261
    5
    java.io.IOException: Address already in use: Cannot bind 2
    which means there is error in :
    mgr.initialize(localAddr);
    mgr.addTarget(destAddr);
    But i don't know what's wrong with the code,
    can any one help me?

    I do not find any problem using the same ports for local and destination address with several unicasts. My problems are others.
    But note that the error is even at constructing the localAddress, I mean before trying the destinationAddress. Thus the reason cannot be the former is already in use. In fact I think the later belongs to a remote hosts. Likely, it is trying to access the destinationAddress through the localAddress, but this has not been constructed properly.

Maybe you are looking for

  • Item category and Account assignment category field grayed out in PR/PO

    Hello all, While making a PR/PO we use both the item category and account assignment category. However, after saving the PR/PO, when i try to change the fields through ME22N/ME52N, the fields are greyed out. I dont think this can be controlled throug

  • Need Step by step installation guide for Cisco ISE in distributed environment.

                 Hi Friends, If anyone is having  step by step installation guide for Cisco ISE in distributed environment please shere! I have user guide from Cisco, but does someone have created at the time of actual installation. Thanks, Sachin

  • CS4 Mac: Inserting PayPal buttons?

    Hello.  I have a Mac user who needs to be able to create specific PayPal buttons for new events and update a web page with the new button as the event draws near.  Can this be done in Mac Contribute CS4?  Does the user create the button in PayPal and

  • Don't know how to convert media format! Urgent!

    Hey, Here is my code to convert between format try mainProcessor = Manager.createProcessor(new MediaLocator("file:///c:\\j.wav")); mainProcessor.configure(); mainProcessor.realize(); }catch (Exception e) {e.printStackTrace();} DataSink sink; MediaLoc

  • An unknown error occurred (-9812)

    help!! I updated the software on my itouch and now once it was restarted it will not work! When I click on te ipod icon on the toolbar in itunes this message appears, please help!