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...
Type: Posts; User: Junky
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...
Google "compare strings java"
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...
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...
Once again what does it return when it doesn't find the zipcode?
So it isn't returning null. What is it returning instead?
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...
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...
So what is your problem? Do you get error messages? If so you will need to post them since we don't read minds.