How can i maintain a dynamic array

I want to maintain an dynamic array in my code . It shoud grow accroding to no of user inputs . 1 can entre 5 numbers and other 10 , then array size should grow orderly 5 and 10 like that . Array is int array.

Read up on the Collections API. There is a tutorial on this site. At first blush, you want a List. If it will grow and you will not be removing and inserting constantly from the 'middle' of the list of items, then ArrayList is a logical choice as your List. Otherwise, use LinkedList. But definitely bone up on the tutorial. Understanding how Collections work is fundamental to any Java programming you will do.
- Saish

Similar Messages

  • How can I pass an empty array to a parameter of type PLSQLAssociativeArray

    How can I pass an empty array to a parameter of type PLSQLAssociativeArray in VB? I defined the parameter like this
    Dim myArray() as String = new String() {}
    Dim myPara as new Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
    myPara = 0
    myPara.Value = myArray
    When I execute my stored procedure giving the above parameter, I got error saying OracleParameter.Value is invalid.
    I have tried to give it the DBNull.Value, but it doesn't work either.
    Note: everything works fine as long as myArray has some item in there. I just wonder how I can make it works in case I have nothing.
    Thank you,

    How can I pass an empty array to a parameter of type PLSQLAssociativeArray in VB? I defined the parameter like this
    Dim myArray() as String = new String() {}
    Dim myPara as new Oracle.DataAccess.Client.OracleCollectionType.PLSQLAssociativeArray
    myPara = 0
    myPara.Value = myArray
    When I execute my stored procedure giving the above parameter, I got error saying OracleParameter.Value is invalid.
    I have tried to give it the DBNull.Value, but it doesn't work either.
    Note: everything works fine as long as myArray has some item in there. I just wonder how I can make it works in case I have nothing.
    Thank you,

  • How can I maintain more than one contact person for a supplier

    Hi
    As per our business requirement , How can I maintain more than one contact person for a single supplier in SRM?
    How these contact persons are supposed to log in to a portal with different user id and passwords and access the bids for same supplier.
    we are in SRM 7, and currently we are creating contact person throug customised BDC.
    please advice.
    Thanks & Regards
    NITIN
    Edited by: nitinkk on Sep 9, 2011 10:22 AM

    Dear Yaniv,
    Thanks for your information,
    I am able to create  users But my problem is How these contact persons are supposed to log in to a portal with different user id and passwords and access the bids for same supplier ? Is there any kind of maping is available for the user/ contact person to the supplier no.??
    Thanks & Regard
    NITIN

  • HT1660 How can I maintain two separate itunes accounts on one single device without erasing either set of data?

    How can I maintain two separate itunes accounts on one single device (iPhone 4) without erasing either set of data when syncing with itunes?

    Hi,
    Depends on what you trying to setup but for purchases, you can roll down at the very end of the iTunes/AppStore pages to logout of your current account and then login into a different one.  Then your purchase will be billded to this new account.  Everything will sync as you used to but in order to use the purchased content in iTunes or other devices, you will need to authorize them (you can have up to 5 devices authorized for an account).

  • How can I do a dynamic include of a page fragment?

    I have a technical support website with a lot of simple html pages. What I want to do is hyperlink from the index page to another page, which would display these html pages as a page fragment, dynamically based on a session bean set by the hyperlink.
    I basically want to do this, if it was possible:
    <jsp:directive.include file="#{SessionBean1.pageToDisplay}"/>
    Now the FAQ's has a topic "How can I do a dynamic include of a page fragment?", which would seem to answer my question.
    But this is all it says, and it makes no sense to me. Could someone please translate? :)
    "Using a page fragment file (but using instead of the usual Creator approach) will accomplish a dynamic include."

    Here is 1 solution:
    First add this to the jsp:root tag:
    xmlns:c="http://java.sun.com/jsp/jstl/core"
    Then surround the page fragment directive with something like this:
                            <div style="position: absolute; left: 24px; top: 408px">
                                <c:if test="${SessionBean1.count > 0}">
                                    <jsp:directive.include file="testPF.jspf"/>
                                </c:if>
                            </div>

  • How can I maintain multiple white spaces in a PDF written from InDesign?

    I need to have 2 white spaces maintained (within a part #) in the PDF I write, but when I open in Acrobat it converts it to one space.
    I've tried word spaces, set spaces and applying "no color" to a placeholder character and nothing is working!
    Any ideas or suggestions?

    I am talking about normal white space. Multiple fixed widt spaces are not a problem. How the space is handled in a PDF depends on how it is created.
    Viele Grüße
    Wilhelm Georg Adelberger
    Von meinem iPhone gesendet
    Am 21.08.2014 um 12:01 schrieb Peter Spier <[email protected]>:
    How can I maintain multiple white spaces in a PDF written from InDesign?
    created by Peter Spier in InDesign - View the full discussion
    It may not be a great idea to use multiple spaces, but it certainly is not prohibited and sometimes is necessary -- you might want a 2em space, or a thin space before and after a tab you underline in a form.
    I'm able to select the multiple spaces just fine in Acrobat 9 using the text touch-up tool.
    Please note that the Adobe Forums do not accept email attachments. If you want to embed a screen image in your message please visit the thread in the forum to embed the image at https://forums.adobe.com/message/6661037#6661037
    Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page:
    To unsubscribe from this thread, please visit the message page at . In the Actions box on the right, click the Stop Email Notifications link.
    Start a new discussion in InDesign by email or at Adobe Community
    For more information about maintaining your forum email notifications please go to http://forums.adobe.com/thread/416458?tstart=0.

  • How can i add a dynamic header value in to the pdf

    I am using a AssemblerService (Invoke DDX) to modify a Pdf file. How can i enter a dynamic value into the header using ddx ?
    DDX used
    <DDX xmlns="http://ns.adobe.com/DDX/1.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd">
        <PDF result="Out1">       
            <PDF source="Doc2">
                <Header>
                    <Right>
                        <StyledText>
                            <p>"here i need to add a dynamic data from the process"</p>
                        </StyledText>
                    </Right>
                </Header>
            </PDF>
        </PDF>
    </DDX>
    Thank You.

    Insertion Point is a placeholder Object which is used to dynamically replace while assembling. Search through the assmber guide to get any hints.
    Nith

  • How can we maintain multiple payment terms for a customer

    how can we maintain multiple payment terms for a customer?

    Hi,
    You can leave the Payment terms field in the sales area data tab blank. and you can enter the payment terms at line item level while creating the sales order. By that you will achieve multiple payment terms for the same customer in the same sales order. but the invoice will be split by standard SAP based on the payment terms.
    Also difference between the "Payment Terms" field in Company code tab and the sales Area tab is.
    Company code tab payment terms are used only for the documents that are posted directly in FI module. for example credit and debit memos posted directly in FI and as a leading practice this should always be "payable Immidiately"
    Sales area Tab payment terms are the one which are copied on to the sales order header data which are valid for all the line items unless you specifically mention different payment terms at line item level.
    Regards,
    Shantanu

  • How can we maintain tetxs in webdynpro insted of hardcode

    Hi Experts,
                    i am new for this webdynpro abap.how can we maintain tetxs in webdynpro insted of hardcode like text symbols in abap.we are using freaquently texts in message manager.in best practice we should not maintain hard code.
    guys suggests me.

    Hi.,
    For Labels You can Use OTR ( Online Text Repository )  Goto View ., In Menu bar Goto Online Text Repository and Add text ., then For Label Text press F4 then u can assign the Created Text.,
    For Messages; Instead of HardCoding., Create  a Class and Use that Class in Your WDA As Assistance Class ., In the Class Go to Texts and Add the text elements same as Text elements in se38. , You can use those text elements by providing message id in WDA ., using
    WD_ASSIST->IF_WD_COMPONENT_ASSISTANCE~GET_TEXT( '001' ).  " here 001 is the text element id which u created in class
    hope this helps u.,
    Thanks & Regards,
    Kiran

  • How can I maintain the classification in UI when creating a new BP?

    SAP CRM 2007 (UI)
    Hi,
    In SAP GUI the classification can be maintained in tab “classification”.
    How can I maintain the classification in UI when creating a new BP?
    Thanks for your support.
    Regards,
    AV

    Hi Anand,
    thanks for your prompt answer.
    By default all ship-to-parties are assigned to classification “Customer”. How can we assign a different classification to ship-to-parties in UI? The view “Account classification” seems to be different from the tab “classification” in SAP GUI.
    Regards,
    AV

  • How can we maintain External cache in TopLink JPA

    Hi,
    JPA maintains shared session cache for the purpose of multiple users .Individual user can not use this shared session cache . How can we maintain that individual user cache in TopLink JPA . In our application we are using container managed transactions.
    Regards
    Sucharitha.

    I'm not sure I understand, perhaps you could clarify your question?
    Do you want to access an object from the shared cache? There is a TopLink JPA query hint "return-shared" to allow for read-only shared objects to be returned on a query.
    If you do not wish to have a shared cache, you can set the cache to be isolated (see @Cache annotation, or persistence property "eclipselink.cache.shared.<class>").
    You can also access the shared cache directly using getServerSession().getIdentityMapAccessor().

  • How can i maintain conditions for vendor sub-ranges

    Hi All,
    How can i maintain conditions for vendor sub-ranges. These conditions apply to all materials from vendor's sub-range.
    Eg: vendor X has the two subranges R1 & R2. I want to maintain separate conditions for R1 & R2. When ever i created PO with ref to particular subrange that Vendor conditions has to be appeared.
    How can i achieve this?
    Could u pls suggest?
    Thanks & Regards
    Anilkumar Dalai

    Hi,
    First Create a Condition Table with field "Vendor sub-range" in M/03
    Then create an Access Sequence using this Condition Table in M/07
    Then assign this Access Sequence in the Gross Price Condition Type in M/06
    Then assign this Condition type in Calculation Schema in M/08
    Then maintain condition record for this condition type in MEK1
    And then select the appropriate VSR Code in ME21N and check the Pricing.

  • How can I create classes dynamically?

    Guys
    My requirment is I want to create classes and their instancess too dynamically. First is it possible in Java?
    If so, then my next question is how can I refer such dynamically created classes in my code to avoid compilation error.
    Thanks in advance
    Regards
    Sunil

    For other ways to generate classes on runtime you could also have a look at BCEL:
    http://jakarta.apache.org/bcel
    And dynamic proxies:
    http://java.sun.com/j2se/1.4.2/docs/guide/reflection/proxy.html
    If so, then my next question is how can I refer such
    dynamically created classes in my code to avoid compilation
    error.Generally the classes that you load should either implement some interface or extend some abstract class you know of at compile time so that the compiler knows what methods are available for use. If that's not possible you can only use reflection.

  • HT2729 How can I maintain folder structure when copying more than 1 folder of videos to the iphone?

    Spent hours trying to figure this out - no luck!
    I have a video tutorial course that I would like to be able to view on my iPhone, the only problem is that it is broken down into 6 folders - 1 for each subject.
    And if I add the whole course to be synced via iTunes it gets copied ok. But it loses the original folder names that the files are stored in on my PC
    ALL the videos files copied to the iPhone are bunched togeather in the Video app and it takes forever to figure out which one comes next.
    How can I maintain the original folder names/structure that the files are stored in on my PC on the iPhone?

    To follow how I solved this it might be good to know what I started with:
    I have a main folder which I called 'Music Theory' and  6 sub-folders: 101, 102, 103, ....etc.
    with up to 20 or so videos in each one.
    Note: Only import one sub-folder at a time into iTunes and then do all the following actions BEFORE importing the next sub-folder:
    Add only 1 sub-folder to the 'Films' section in iTunes (either drag and drop or use the File - Add Folder to Library).
    Select all the imported videos (hold down the Ctrl + A keys on the keyboard simultainiously).
    Right click and select 'Get Info'
    Then you may get a pop-up with this text but just click the 'Yes' button:
    You should now have the 'Multiple Item Information' window showing. Click on the 'Options' tab and edit as below:
    Tick: 'Media Kind'               and from the Drop Down Box choose:  'TV Programme'
    Tick: 'Part of a Compilation'   and from the Drop Down Box choose: 'Yes'
    Tick: 'Remember Position'        and from the Drop Down Box choose: 'Yes'
    Now click on the 'Video' Tab of the 'Multiple Item Information' window and edit:
    The 'Programme' text field (I entered Music Theory) This will be the main heading for all the folders that I want to add to this series.
    The 'Series' text field (I entered 101 for the first sub-folder)
    Now click the 'OK' button.
    iTunes now starts processing all you have done and moves the vildeos to the 'TV Progammes' section.
    The first part is now done!
    Now you should repeat all the actions you have done from the start on each sub-folder you want to include in this Video collection, then when you've done that you can upload the lot to your device (iPhone in my case) with this last step:
    All you need to do now is select your device under 'Devices' in the left hand menu and tick the 'Sync TV Progammes' box in the 'TV Progammes' section and select the series that you want include in the right hand area. And then click 'Apply' and now your done!!!    :-)

  • With three browsers on three computers, how can you maintain them individually if they all match one another? Which is the dominant browser?

    With three browsers on three computers, how can you maintain them individually if they all match one another? Which is the dominant browser?
    For example, how can I have one addon disabled or removed on one computer's browser without is affecting the other computers?

    If you are referring to the Firefox Sync service, they are all equal. When data is changed on one computer, the changes will be sent to the other computers once Firefox is opened the next time.
    If you don't one type of data synchronized on a particular computer, then don't select that type of data for being synchronized.

Maybe you are looking for