Search:

Type: Posts; User: Junky

Search: Search took 0.45 seconds.

  1. [SOLVED] Re: Reading file and adding it to an array through a method

    You know have a similar issue as you had before. Pretend you are the computer executing the code line by line. Tell me what happens after the code looks at the first element in the list. Of once...
  2. [SOLVED] Re: Reading file and adding it to an array through a method

    Google "compare strings java"
  3. [SOLVED] Re: Reading file and adding it to an array through a method

    It is not returning the brackets. What your code does now is return an empty ArrayList and if you try to print an empty List that is the output you see. Why does your method now return an ArrayList...
  4. [SOLVED] Re: Reading file and adding it to an array through a method

    That makes no sense. In no way can your program return brackets. Look at your code very carefully. Inside the loop you search for the zipcode and if you find it that zipcode is returned. If it...
  5. [SOLVED] Re: Reading file and adding it to an array through a method

    Once again what does it return when it doesn't find the zipcode?
  6. [SOLVED] Re: Reading file and adding it to an array through a method

    So it isn't returning null. What is it returning instead?
  7. [SOLVED] Re: Reading file and adding it to an array through a method

    Because that is all you code does.

    Grab the first object in the list
    Do a comparison
    If it matches return object
    Else return null

    It never goes around the loop a second time to compare the...
  8. [SOLVED] Re: Reading file and adding it to an array through a method

    Take a look at your if statement. You compare the first ZipCode object to the zipcode you are searching for and if it matches you return the ZipCode object else you return null. Which means your find...
  9. [SOLVED] Re: Reading file and adding it to an array through a method

    So what is your problem? Do you get error messages? If so you will need to post them since we don't read minds.
Results 1 to 9 of 9