Creating a collection / arraylist

Hi, i'm pretty new to java and am finding it hard going, so much to learn! I would like to know how to store elements in groups (eg. storing the details of a CD which contains Artist, Title, Genre etc.) so that i can access a group from all the groups that I've stored. Ive heard that collections and arraylists are a useful way of doing this but as yet I havent fully grasped how they work. How do i go about creating a collection? how do i add things to a collection. Where could arraylists come into this?
Thanks for your time,
dodgevinyl

Here are some more goodies...
Sun's basic Java tutorial
Sun's New To Java Center. Includes an overview of what Java is, instructions for setting up Java, an intro to programming (that includes links to the above tutorial or to parts of it), quizzes, a list of resources, and info on certification and courses.
http://javaalmanac.com. A couple dozen code examples that supplement The Java Developers Almanac.
jGuru. A general Java resource site. Includes FAQs, forums, courses, more.
JavaRanch. To quote the tagline on their homepage: "a friendly place for Java greenhorns." FAQs, forums (moderated, I believe), sample code, all kinds of goodies for newbies. From what I've heard, they live up to the "friendly" claim.
Bruce Eckel's Thinking in Java (Available online.)
Joshua Bloch's Effective Java
Bert Bates and Kathy Sierra's Head First Java.

Similar Messages

  • Is there a way to create a collection based on the "previous import"?

    is there a way to create a collection based on the "previous import"? that would make it easy to mobile sync the last import to my ipad, and do further picking/rejecting while away from my laptop.

    well, yes, of course i could do it that way. i guess i wasn't specific enough. is there a way to create a smart collection, with the photos in the "previous import" as members of the smart collection.  earlier i mentioned about using this smart collection to mobile sync with my ipad, to do further flagging.
    so my intention, use a smart collection to mobile sync with my ipad, and the smart collection to include the photos from my previous import.
    i guess another way to ask the question, is there a way to create a smart collection, by using some rule or condition in the smart collection, to automatically include previous import photos.
    the documentation says that "previous import" is a collection, even though it shows up in the catalogue side bar section. but i see no way to choose that collection when making a smart collection.
    jd

  • Create a Collection of machines missing a single patch MS07-042

    Good Morning All,
       I am trying to create a collection for all machines missing a single patch.  MS07-042.  This patch has multiple KB numbers. 
    I noticed a couple of odd occurances.
    1) Console query builder does not expose the Updates classes.
    2) Console query builder does expose all the ITMU classes.  I am not sure if these are populated with the WSUS information gathered by the WUA.
    I did create the following query
    select * 
    from  SMS_R_System inner join SMS_UpdateComplianceStatus on SMS_UpdateComplianceStatus.MachineID = SMS_R_System.ResourceId
       inner join SMS_Softwareupdate on  SMS_Softwareupdate.CI_ID = SMS_UpdateComplianceStatus.CI_ID
    where SMS_Softwareupdate.BulletinID = "MS07-042"
    However, I am unable to locate any documentation on what the Status Fields indicate in SMS_UpdateComplianceStatus.
    My Questions
    1) Is there an easier way to do this?
    2) Is there any documentation on what the fields mean in SQL?
    I look forward to blogging about this as soon as I am sure of an answer.
    Best
    Shaun Cassells
    http://myitforum.com/cs2/blogs/scassells/default.aspx

    Torsten, do you have a refrence for the SMS_UpdateComplianceStatus table?  I want to know what the Status Field values represent.
    I realize this is an old thread, but I just wanted to put in my $0.02 in case someone else stumbles upon it looking for info.
    So, the SMS_UpdateComplianceStatus class (cuz we're talking collections here, which is WQL and pulls from WMI classes) is really the equivalent of the v_UpdateComplianceStatus view.  So if you want to see what's in that, go to SQL and query it.
    Also, if you want to know what the Status field values are, you can find those by looking at the v_StateNames view from SQL too where TopicType = 400 I believe.
    State 0 = Unknown
    State 1 = Not Required (meaning doesn't have patch and doesn't need it)
    State 2 = Not Detected (meaning it doesn't have patch but needs it)
    State 3 = Detected (meaning it has this patch)
    So, if you want to create a collection of machines that are missing a patch, you could do something like this:
    SELECT
      SMS_R_SYSTEM.ResourceID,
      SMS_R_SYSTEM.ResourceType,
      SMS_R_SYSTEM.Name,
      SMS_R_SYSTEM.SMSUniqueIdentifier,
      SMS_R_SYSTEM.ResourceDomainORWorkgroup,
      SMS_R_SYSTEM.Client
    FROM
      SMS_R_System
      JOIN SMS_UpdateComplianceStatus
        ON SMS_R_System.ResourceID = SMS_UpdateComplianceStatus.MachineID
        AND SMS_UpdateComplianceStatus.Status = 2
      JOIN SMS_SoftwareUpdate
        ON SMS_UpdateComplianceStatus.CI_ID = SMS_SoftwareUpdate.CI_ID
        AND SMS_SoftwareUpdate.ArticleID = 832671
    Number2 - (John Nelson)
    Microsoft MVP (2009) - System Center Configuration Manager
    http://number2blog.com

  • Creating a collection from a query in Apex 4.2 is not populating the data into the collection.

    I have a process that creates a collection with data from multiple tables. The query returns multiple rows in 'Sql commands' tab. The same query is used to create the collection in 'Before Header' and when i create a region with Region source as
    Select * From apex_collections Where collection_name = 'load_dashboard';
    At the time of rendering the page shows me 'no data found'.
    what could be the problem? Are there any prerequisites before creating the collection?
    Thanks in Advance,
    Sriram

    Hi Denes,
    Below is my code for creating and saving data into the collection.
    if apex_collection.collection_exists(p_collection_name =>'load_dashboard') then
       apex_collection.delete_collection(
             p_collection_name =>'load_dashboard');
    end if;
    apex_collection.create_collection_from_query(
        p_collection_name => 'load_dashboard',
        p_query => 'select a.rowid
                   ,b.first_name
                   ,b.last_name
                   ,c.job_title
                   ,d.parent
                   ,d.child_level_1
                   ,d.child_level_2
                   ,a.resource_allocation
                   ,a.person_id
                   ,a.month_id
                   ,a.oracom_project_id    ,wwv_flow_item.md5(a.rowid,b.first_name,b.last_name,c.job_title,d.parent,d.child_level_1,d.child_level_2,a.resource_allocation,a.person_id,a.month_id,a.oracom_project_id)
    from oracom_resource_management a, oracom_people b,oracom_job c ,oracom_project d where a.supervisor_id=886302415 and a.month_id=201312 and a.oracom_job_id=c.job_id and a.person_id=b.person_id and a.oracom_project_id=d.oracom_project_id',
       p_generate_md5 => 'YES'
    Sriram.

  • Escape '  ' while creating a collection in Oracle APEX

    Hi all
    I am creating a collection where I am using substr and instr functions and it does give an error message as below
    • ORA-06550: line 14, column 79: PLS-00103: Encountered the symbol ", -1)) OWSR, null PRIM_ADD , null PRIMA" when expecting one of the following: ) , * & = - + < / > at in is mod remainder not rem <an exponent (**)> <> or != or ~= >= <= <> and or like like2 like4 likec between || multiset member submultiset
    Relevant Portion where the error pops up:
    APEX_COLLECTION.CREATE_COLLECTION_FROM_QUERY(
    p_collection_name => 'RANGE_COLLECTION',
    p_query => 'SELECT
              :P999_LOC_TYPE ADD_TYPE_ID
              , TRIM(:P999_OWSR) PRIM_ST
              , SUBSTR(TRIM(:P999_OWSR),1,1) PRIM_DIR
              , SUBSTR(TRIM(:P999_OWSR),INSTR(TRIM(:P999_OWSR), ' ', -1)) PRIM_SUF
    ......... on the line below
    SUBSTR(TRIM(:P999_OWSR),INSTR(TRIM(:P999_OWSR), ' ', -1)) PRIM_SUF
    Does anyone have any solution how to escape the single quotes in Oracle APEX 4.2. - like \' or something? I already tried using backslash but had no luck.
    Would really appreciate your help ASAP.
    Thanks,
    Rads

    Rads wrote:
    Does anyone have any solution how to escape the single quotes in Oracle APEX 4.2. - like \' or something? I already tried using backslash but had no luck.Quotes in string liberals in Oracle are escaped by doubling them up:
    execute immediate 'update emp set sal = sal * 1.2 where ename = ''SCOTT''';However a better approach when dealing with SQL strings is to use the alternative quoting mechanism:
    execute immediate q'{update emp set sal = sal * 1.2 where ename = 'SCOTT'}';as this allows the original string to be left unaltered.

  • Create a collection based on an exisiting collection

    I have a collection that has a install with a deadline running for the last week. I see that there are still machines pending installation. The current collection has a maintenance window set which includes over 1500 machines. Since 95 % of them completed
    I need to remove the completed from the collection and leave the exisiting machine behind to continue the installation. 
    So either create a way to move completed machine to a completed collection or just remove them from the existing collection or
    Create a limiting collection that contain machines in progress and unknown machines from the original collection. 

    Hi,
    You could try to create a Configuration Baseline to detect the installation. Right click the Baseline deployment to create a collection according to the Baseline evaluation results. Is this possible?
    How to Create Windows Configuration Items for Compliance Settings in Configuration Manager
    http://technet.microsoft.com/en-us/library/gg712331.aspx
    Best Regards,
    Joyce
    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.

  • Ability to create a collection from a text file containing the names of the pictures

    1 thing that would be very good is the ability to create a collection / quick collection from a text file that contains the names of the picture we want in that collection...
    The reason for that is when i receive an order from a customer typicaly 100-200 different pictures (i'm a wedding photographer), i ask my customer to send me an excel spread sheet with all the name or number of the picture thay want with size & quantity...
    I would like to be able to use that file as an input for a batch job that would add all those files to a collection "customer order" instaid od adding them 1 by 1... it would save me lots of time and would prevent some errors in the order...
    I am currently able to do that with the help of a small utility (Useful File Utility) is the name... with the other RAW converter i use... Bibble

    Well, it is workflow software, true, but it's really focussed on image development. What you're proposing would necessarily make the primary focus be on the business angle, I suspect.
    If you're talking about tools to help customers sit down and pick what they want for manual processing later, that's one thing - but going the rest of the distance to order processing and fulfillment would be out of scope, at least in my view. The reason is that there is just so much room for potential variation in how this gets conducted that I can't see how Adobe could possibly satisfy every pro with one implementation. Even just dealing with all of the possible payment vendors is a hugely problematic area.
    I agree with Don; a third-party plugin via the upcoming SDK might be a distinct possibility, particularly if it were for a "plus services" solution in which the plugin were designed to work with a specific fulfillment vendor. THAT could work quite nicely, and the plugin might even be free (in return for giving the vendor your business, of course).
    In other words, it's not that I see it as a bad idea, it's just that I don't think it belongs in the "core" of LR. This is something that is best dealt with using the SDK so that differences in processes can be allowed for.

  • SCCM 2012 - Creating a Collection with Limiting memebers to 5 or 10 Computers even the Memebership Query can pull 1000 members

    Dear Brothers,
    I am deploying a huge application (requires 45 Minutes to Install, 3 to 5 Restarts), and I need to limit the deployment to 5 computers at a time. Limiting my Network Load and also the availability of the computers in operation as it requires a successive
    Restart.
    My aim is to "Create" a "Collection" to focus on deploying the software to
    5 computers at a time. The collection that limits to 5 computers can help our production environment to focus on the total deployment time without disturbing other computers.
    Regards,

    I would use powershell to do this. Create a Collection with all the computers that should get the application.
    Then in powershell - get all the members of that Collection into a variable. Use that variable as a basis for creating new Collection and create some logic that takes 5-10 machines and put those into a new Collection and then takes the next 5-10 machines
    and so on.
    I guess you could also do it using a combination of Query and Exclude Collections membership rules, but you would have to do it manually.

  • Creating new "Collection Set" deselects everything for no reason.

    In Library mode: Creating new Collection Set performs "Select none" (changes source) for no reason.  A new set cannot contain photos (until it has a collection) so there is no reason to change source to it yet.  It is behaving as if it were a new collection.  I often select photos first, then decide whether they need to be in a collection.  If I need to first create a set for it --I lose the selection before I can place them.
    Is this "as designed" and am I overlooking something?

    If Verizon sent you an STB, it should have been delivered via a delivery service (they use UPS around here). Included in the paperwork should have been a return label that would allow you to drop it off at any UPS store, and the return shipping would be free.
    If I were you, I would keep whichever STB and remote look to be in better condition, pack up the other one with any accessories they demand to have returned, and drop it off at whichever service delivered it. Make sure to get and keep some kind of confirmation number that the delivery service has received the box. Though I've never had any problems myself, I've heard a few horror stories about Verizon claiming to have never received the returned merchandise and trying to charge the customer for it. Better safe than sorry.
    FYI - The reason that FIOS triggers the spell check is because it is spelled FiOS (Fiber Optic Services).
    Find this post helpful, informative or just something you agree with? Click the red ‘thumbs-up’ button.
    Did this post solve your problem? Click the green ‘Accept as Solution’ button.

  • Unable to see User eixt macro in SCM 4.1 - When creating a Collective Macro

    Hello :
    we are SCM 4.1. We have a need to run 4 macro in a sequence.  I felt that I could create a collective macro and list the macro's.. The macro are user exit macro's. and I am unable to see them in the drop down list.. tried to search OSS Notes . did not find a lot of info.
    Would appreciate any insights and suggestions. We are on SCM 4.1
    Raghu

    Hello Andy
    Thank you for the reply.
    I am trying to create a "Collective MAcro" which would run 4 macros.  In hte COllective macro there is a drop down option to select the macro that we want to run.. We can select upto 6 macros..
    In this drop down list, I am unabel to see the 4 user exit macros. The macro that I want to run in a sequence are "user exit macros". They are active and can be executed one at a time in Interactive Planning.
    I am creating a "Collective Macro" as this would ensure that the 4 user exit macros are run in the correct sequence.
    OSS note 907177 refers to availabilty  of "badi macros" in Collective macro. This is only for SCM50..
    We are in SCM 4.1. ANy pointers can be of great help
    Raghu

  • Unable to Create site collections with any template

    Hi All,
    We are using SharePoint 2013 , after long time am tried for create new BI center in one of our web application , but its taking more then 10 mints , the page is loading more then 10 mints , after that i just refresh the page and i got a error "Sorry
    this site was created already with this name".
    so , i try to enter the new site URL am getting error the page is not valid .
    i thought this was on issue with requirements on BI Center , so i checked the web application associated service application , but i have Visio Graphics service application , Excel Service Application and Performance point service application running for
    this web application .
    after some time i tried to create team site template site collection , i am facing the same issue again , i really dont know what is the issue with my CA , can any one help me to solve this issue ASAP.
    i tried to create site collection from PowerShell also , but am facing the same issue , even i got the same error while try to create sub site. i tried with refreshing IIS also , but its not worked.
    Am waiting for your valuable response .
    Thanks,
    Mani L
    Mani L

    Hello Mani L,
    Please make a host entry on you WFE server for the URL of the site you are trying to create. Then try browsing the site from same server.
    - First check if the binding is correctly configure in Alternate Access mapping on Central administration
    - Same binding should be provided under IIS for the web application
    If this doesn't resolve the issue then, for testing create a host entry for central admin hostheader url.
    To do this follow below mentioned steps:
    Go to Start -> Run -> Type drivers
    open HOSTS file in a notepad
    type IP address of the APP server and beside that with a tab key type URL of the site
    Save the file and try to browse the site in a fresh new browser after closing all the browser.
    Where SharePoint.com is my Host Header URL and IP address is the server IP where the site is hosted (APP Server generally)
    Thank You, Pallav S. Srivastav ----- If this helped you resolve your issue, please mark it Answered.

  • Can't create Smart Collection, Save-Button doesn't work

    i have the Problem  that i can't create Smart Collection, the Save-Button doesn't work, the Smart-Collection Window stays open and nothing happens when i click the "save" button!
    i use CC with a new installed W8 and all is up-to-date.
    Its a strange thing. Please Help me.

    Just to clarify, Photoshop CC has not been released yet.  It will come out on June 17.
    What you have now is Photoshop 13.x as per the subscription model (»Abo«) and it's called Photoshop CS6.  When Photoshop 14.x is released on June 17, then it will be called "CC".
    It's not clear—at least to me—which images, if any, you have selected in Bridge when you hit the »Speichern« (Save) button.
    Remember that a Collection is nothing more than a saved search, i.e. a saved collection of selected search results (hits).
    Could you elaborate on what it is you want to save as a collection? 
    Incidentally, the Adobe Bridge forum is here:
    http://forums.adobe.com/community/bridge?view=discussions

  • How to create a collection using the Reader for PC or Reader for Mac software.

    Solved!
    Go to Solution.

    A collection is a custom set of books and other items that you create from items on the Reader or the library of the Reader™ for PC or Mac® software. It is a unique and convenient way to organize your items. You can organize and personalize your content by creating collections by subject matter, date, genre or anything that best suits your purpose.
    Create a collection:
    Click the My Library tab.
    On the category bar, click Collections.
    Click the Create New Collectionbutton.
    Enter a collection name and then press Enter on your keyboard. A new collection will be added to the Collections list.
    Add books to the collection:
    Once you have created the collection, click the My Librarytab.
    On the category bar, click to select the book you want to add to the collection. Multiple books can be selected by holding down the Ctrlkey while clicking on the books.
    With the book(s) selected, at the bottom of the screen, click the Add to Collectionbutton.
    From the menu that pops up, click to select the collection you want to add the book(s) to.
    NOTE: The next time you sync your Reader Digital Book, the collection and its contents will be added to your Reader device.

  • Create a collection in the beforeshown by query sort by designer does not sort

    In the beforeshown function of a screen, I create a collection. This collection will be displayed in my target screen. I have added in the designer a Sort order by the displayed screen does not conform to this sort.
    Where is my error? The creation of the collection in the beforeshown function makes the query sort order execute before the collection is really created? Or the collection is not really database saved because it has been created in the beforeshown function?
    In the case I must do the sort in the Created function of the target screen with something like
    screen.StrengthCollection.setOrderBy()
    But I do not know how to give the right parameter to setOrderBy...
    Yves Pflieger

    Hi,
    You can try
    To Bind a Query Parameter to a Field
    1.Create a query that accepts a parameter (for example: the ID of a customer). For more information, see How to: Design a Query by Using the Query Designer.
    2.Add the query to the Screen Content Tree. For more information, see How to: Design a Silverlight Screen by Using the Screen Designer.
    3.Add a local field to the screen. For more information, see How to: Add a Local Property to a Silverlight Screen.
    4.In the Screen Members List of the Screen Designer, select the parameter of the query.
    5.On the View menu, click Properties Window.
    6.Select the Parameter Value text box.
    7.Select or type the name of the local field.
    You can refer to article below:
    https://msdn.microsoft.com/en-us/library/ff851987.aspx

  • How can we create a Collective search help

    Hi all sap experts,
    How can we create a Collective search help on field “OBJECT” which allows to search tables
    o   ARCH_OBJ
    o   TOJTB (Search help: H_TOJTB)
    on 2 tabs.
    Thanks,
    Basu

    Hi
    1) Elementary search helps describe a search path. The elementary search help must define where the data of the hit list should be read from (selection method), how the exchange of values between the screen template and selection method is implemented (interface of the search help) and how the online input help should be defined (online behavior of the search help).
    2) Collective search helps combine several elementary search helps. A collective search help thus can offer several alternative search paths.
    3)An elementary search help defines the standard flow of an input help.
    4) A collective search help combines several elementary search helps. The user can thus choose one of several alternative search paths with a collective search help.
    5)A collective search help comprises several elementary search helps. It combines all the search paths that are meaningful for a field.
    6)Both elementary search helps and other search helps can be included in a collective search help. If other collective search helps are contained in a collective search help, they are expanded to the level of the elementary search helps when the input help is called.
    CREATION:
    Go to SE11  Tcode
    select search help
    give the 'z' search help name and create
    select the selection method ur table name eg : 'mara'
    dialog module 'display value immediately'.
    add the field whatever u want and lpos = 1 and spos = 1 and check import and export parameter.
    where left position when displaying and spos = search position
    and then save and activate ..
    See the links:
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee38446011d189700000e8322d00/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/cf/21ee45446011d189700000e8322d00/content.htm
    pls go through this for search help creation
    http://help.sap.com/saphelp_nw2004s/helpdata/en/41/f6b237fec48c67e10000009b38f8cf/content.htm
    Search Help Exits:
    Re: dynamic values for search help
    Re: Dynamic search  help
    Reward points for useful Answers
    Regards
    Anji

Maybe you are looking for