Okay. I'm working on a
servlets assignments that requires the use of Cookies. Cookies are stored in an Array, and the only way to pick out the cookie you're searching for is to iterate through the array until you find it. Now, I know I should be able to figure this out on my own, but my brain has gone numb. Here's the deal:
I want to stop the for loop once the cookie with the name "id" is found, if it is found, and have isValid return true. If the cookie is not found, isValue should remain false. How can I iterate through the array and stop when I've found the right cookie? Maybe a while loop instead of a for loop???