Need help with Java code

Discussion in 'OT Technology' started by spyder2581, Mar 2, 2007.

  1. spyder2581

    spyder2581 Active Member

    Joined:
    Jun 2, 2004
    Messages:
    2,108
    Likes Received:
    0
    Location:
    Michigan
    I am a complete noob in java and Im struggling with searching arraylists :o. I need to make a method that searches an arraylist of 10,000 movies and return any movie titles that contain the word that im searching for(the results are put in a new array list) Heres what the instructions say >>

    public ArrayList <MoveEntry> searchTitle(String substring) - find all MovieEntries that have a title that contains the substring. Upper case and lower case are ignored. For example, a search string for "HAPPY" will return titles such as "Happy Gilmore", "Love Happy", and "The Happy Family". Since there can be more than one match, place all matches in a new ArrayList that is returned. If no matches are found, the ArrayList will contain zero elements.

    Can anyone help me? I don't know how to do the search at all. Let me know what info I need to give u
     
  2. zysus

    zysus New Member

    Joined:
    Dec 8, 2004
    Messages:
    175
    Likes Received:
    0
    Location:
    It snows here...
    There are several ways to do searching in Java. (Any language really)
    1. You can check everything. (Always works)
    2. You can use tricks (Has limitations)

    Java has utility functions in the java.util.Collections class. Take a look at the javadoc. It will help.
     
  3. Sexual Vanilla

    Sexual Vanilla New Member

    Joined:
    May 23, 2005
    Messages:
    6,305
    Likes Received:
    0
    Location:
    South Carolina
    What do you have so far? Or have you not done anything yet? :squint:
     

Share This Page