Any advice on which method I should use?

Essentially, I will be collecting a varaible number of longs. Te fixed length of arrays makes it seem inefficient and I am not sure what collection method/object I should be using otherwise. Please advise. Thank you.

Essentially, I will be collecting a varaible number
of longs. Te fixed length of arrays makes it seem
inefficient and I am not sure what collection
method/object I should be using otherwise. Please
advise. Thank you.You can use an ArrayList of Long.
An ArrayList basically is a dynamic array implementation so it will grow in size as you add the Longs.
Not that I write Long instaed of long. Long is the wrapper class of the long primitive. ArrayLists can only store objects so if you add longs they will be converted to Long objects instead. This is a drawback but it may not be a problem for you?
One possible strategy is to first collect the Longs in an ArrayList and then when you know the actual umber of longs create a static long array of that size.

Similar Messages

  • I have deleted by accident the backup folder on an external HD. Any advice on which app I can use/buy to recover the info? Thanks in advance!

    I have deleted by accident the backup folder on an external HD.
    I did the backup since I had to sent my macbook pro retina display to customer care.
    By accident, I deleted the backup folder on my external HD.
    Any advice on which app I can use/buy to recover the info?
    Thanks in advance!
    elmoven.- desperate trying to recover his Ph.D info from 3 years

    IT SOUNDS wiered but there is just for your pc just goto statrtup menu--->System tools -->system restore by Today's date and time

  • Can someone tell which player I should use to run flv,avi file in my iPad 3 after download from any site ????

    Can someone tell me which player I should use to run flv,avi file in my iPad 3 after downloading video from any site ????

    Can someone tell me which player I should use to run flv,avi file in my iPad 3 after downloading video from any site ????

  • Which Listener I should use if I drag and Drop an image/icon into a JPanel?

    Dar Friends:
    Happy new year.
    I try to drag and Drop an image/icon into a JPanel, and hope I can immediately detect it after DND,
    Which Listener I should use in this JPanel if I drag and Drop an image/icon into a JPanel??
    Thanks

    Thank camickr .
    I can dnd an image into a JPanel called JPanelOld already, I hope to use another JPanel or JTree to listen to any Dropped Image in JPanelOld later on so I can take some action in another JPanel or JTree.
    so what kind of Listener I should use for my purpose??
    where to add this Listeners??
    Happy New Year.

  • I update my OS to Mount Lion and all my .docs ( microsoft office for mac) can't be read or open. Any advice on to what app should I get so I can open or transfer to so I can open em?

    I update my OS to Mount Lion and all my .docs ( microsoft office for mac) can't be read or open. Any advice on to what app should I get so I can open or transfer to so I can open em?

    What program did you use prior to the updade? Did you updrde that program when you updaded the OS?

  • RFC and Webservice which one i should use and why?

    Hi,
      I have to write a extractor program in BI which would be fetching a huge data from CRM.
      I have two options to achieve this targer.
               1-> Create a RFC which will give me all the data
               2-> Create a Webservice in CRM and use it in BI
    Please advice me , which way i should go and advantage of that way.
    Regards
    PG

    Hi,
    If amount of data is huge then it is recomnded to use RFC because of its speed and reliability. Webservice not yet proven good for extracting and handling very large chunk of data.
    Regards,
    Gourav Khare

  • In which situations we should use Character Mode Reports?

    Question: In which situations we should use Character Mode Reports?
    Explaination: I am faced with a certain situation. I feel that I should develop reports in Character Mode. But I am not sure about this.
    I invite all readers to contribute on the subject matter. Once I receive responses, I will explain my specific situation as writing it now may narrow the list of such situations.
    Also I would like to know what problems we face when developing reports in Character Mode. I was developing my first Character Mode report and I faced layering problems. So I would like to know more such precautions.
    TIA
    Tariq

    Hi Muhammad,
    There's any number of cases for using character mode Reports. However, they all typically come down to what your doing with the output of the report.
    Basically, you need character mode reports whenever the Report output needs to be read by some sort of Ascii file reader. This could be notepad, VI, MSVC, dot matrix or fixed character set printers, ...
    A less common case is where you just want to get at the data within the report. You're just using the ascii output as a data dump to pass through to another program/utility. (This is really just a specialised case of the previous one).
    There are some cases where character mode output may be one of several choices. Eg: the body of an email message which could be HTML or plain text.
    Robin.

  • Hi, I'd like to put a black and white effect on my colour footage which will look really sharp but which also looks bright so the whites look bright and the blacks look very dark . Any tips of which best effects to use to achieve this look in Prem Pro. Th

    Hi, I'd like to put a black and white effect on my colour footage which will look really sharp but which also looks bright so the whites look bright and the blacks look very dark . Any tips of which best effects to use to achieve this look in Prem Pro. Thanks

    Under the Effects-Lumetri Looks-Desaturation choose a B and W effect. Then add the luma corrector from the Video effects-colour correction section. Adjust the brightness and contrast to get the effect you want.

  • Which tool i should use to develope a portal

    Hi all,
      we are planning to develop a portal which we will expose to internet.
    Now my question is which tool i should use to develope this
       1.BSP
       2. jspdynpage
       3.Webdynpro java
       4.Webdynpro abap
    Which application will perform better on internet.
    Lots of rfc calls and webservice calls are there.
    plz give me suggestions .
    Thanks
    developer

    Hi,
    BSP - Abap workbench
    JSP Dynpages - NWDS (Netweaver Dev Studio)
    Webdynpro Java - NWDS
    Webdynpro ABAP - ABAP Workbench
    above all applications will perform at same level  depend on the content.
    best regards
    Hari

  • Which protocol we should use for file transfer in ios ?

    which protocol we should use for file transfer in ios ?

    My friend that's definitively a Lotus Domino question, you'll probably ask in the Domino's forums if it generates wsdl, or simple http services you're ready to consume those services in Flex.

  • I have an iPhone in my name and my wife has an iPad in her name. We have just ordered an iMac and wondered which account we should use to get the best out of all the devices

    I have an iPhone in my name and my wife has an iPad in her name. We have just ordered an iMac and wondered which account we should use to get the best out of all the devices? Can we use both accounts in iCloud?

    Yes you can.  However, it is better to use one person's account most of the time for purchases in the Mac App Store and iTunes since you can share purchases, such as songs, among various devices using the SAME account.  You Cannot share purchases among different accounts, though.   So make one of your accounts the main "purchasing" account so you can share purchases.
    Hope this helps

  • Which platform I should use ?

    which java platform I should use to creat message display and settings in mobile phone ? and how can I add language code in java to show different laguage(other than English) on mobile screen ?

    Or is it the tabbed appearance of the portfolio cover which interests you? I think this might be made with Flash Builder. Very bad choice, to use Flash, in my opinion. Looks slick, certainly, but locking out all customers with iPads and Android is just lunacy. But see Adobe Digital Enterprise Platform * Demonstrating the Flash Builder-based interactive statement

  • I want to create report on Sybase which provider I should use.

    I want to create report on Sybase which is good provider that I should use. I don't want to use the DSN.

    CR no longer has a native Sybase driver. Your only option is to u se ODBC or possibly a JDBC driver if they have one or their client supports one. Look on Sybases site for options.

  • Is there any way by which I can not use Thunar Sys Tray icon?

    I am using stalonetray in OpenBox in Arch and when I copy-paste or cut-paste files in Thunar, a sys tray icon pops up. I don't want it to pop up.
    Is there any way by which I can make it to not pop up?

    Trilby wrote:
    I haven't used thunar for a while - but I don't remember it ever doing this before.  I just verified that it doesn't here (freshly installed thunar, and cut-pasted, copy-pasted, etc, and I didn't get a tray icon.
    Are you sure this isn't some other tool, like a clipboard manager?  Are their any tooltip popups or menus available on the tray icon and/or what happens when you click the icon?
    No. I use only Thunar. When I hover on the icon it says that "1 file operation running" when a copy-paste or cut-paste operation happens and when I left click and right click on it, it shows the copying window of thunar. The icon shows two small yellow folders placed diagonally. It's the same icon that appears on the file operation progress window of Thunar. I don't know whether Numix has anything to do with the specific icon though.
    Last edited by chosentorture (2015-01-11 00:13:32)

  • Which version I should use

    Hi,
    I got this
    Java 1.5.0_03 or later is required for installing Oracle Solaris Studio. Make sure that Java is properly installed and run installer again.
    You can specify valid Java location using --javahome installer argument.
    Can anyone tell me which JDK version I should use there?

    Moderator Action:
    This post has been moved from the Oracle Linux forum.
    You don't have a Linux question.
    You actually don't have a JRE/JDK question.
    You have a Solaris Studio question.
    You needed to spend an extra moment choosing where to post it.
    We moved it for you.

Maybe you are looking for

  • Sound but no video on tv monitor when capturing/viewing timeline

    Can someone please suggest a solution to my problem? It seems that my settings have all of a sudden changed and I can no longer view the video on my tv monitor when capturing or when playing the clips in my timeline. I've already checked to see that

  • Embed Video in inDesign and not have Dropbox logos?

    Hi, Is it possible to embed video from a video stored in your Dropbox folder and not have the Dropbox logos appear?

  • Different value posting in GR

    Hi,    During Goods receipt for import purcahse order bellow three condition type value posted with high value and difference of total purchase order value and these three condition type posted to Inventory account.      ZOA1     Customs %      CVD  

  • Session problem in LazyFetch

    Hi all, I have two entities: User and InfoUser in my website. User has much "InfoUser". @OneToMany(cascade = CascadeType.ALL, mappedBy = "user") private List<InfoUser> infos = new LinkedList(); // Code.. public List<InfoUser> getInfos(){       return

  • Transform Activity

    Can Transform Activity in BPEL Process have Multiple Input Scource Schema to Feed Destination Schema I want schemas s1. s2. s3 feed destination d1? is it possible?