Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: Which java data structure is best to use for my problem

  1. #1
    Junior Member
    Join Date
    Sep 2024
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Which java data structure is best to use for my problem

    As a new java programmer, I'm a little confused by all the types of Lists available in the Java toolset and need some advice regarding which one might be best for my problem.

    I want to create a collection of complex objects and then be able identify objects in the collection by matching on values of the properties of the objects in the collection. For example, if my objects in the collection are Cars, they might have as properties Car #, color, license plate # and registration status. One example operation I want to perform is to set the registration status to "registered" for the Car in the List where the license plate # is 5547A.

    Thanks for your help identifying the best data structure for this type problem.

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,145
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: Which java data structure is best to use for my problem

    Your requirements to be able to access objects in a collection using one of its properties sounds like you need a database. I have never worked with databases and can't help. Try asking your question on this site: https://www.coderanch.com/forums
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. problem in Trie data structure in java
    By Rajchandra in forum What's Wrong With My Code?
    Replies: 1
    Last Post: September 27th, 2014, 05:17 AM
  2. having problem with data structure
    By kmal47 in forum What's Wrong With My Code?
    Replies: 5
    Last Post: January 3rd, 2014, 05:25 AM
  3. Replies: 8
    Last Post: December 4th, 2012, 04:58 AM
  4. Replies: 2
    Last Post: June 15th, 2011, 03:49 PM
  5. Replies: 1
    Last Post: June 11th, 2011, 05:39 AM

Tags for this Thread