I'm working on a class method that will accept a string
array and a string. It then loops to see if that string value matches any of the strings in the array and if it does then it returns the index value of the string in the array that it matches. If the string that is given to the method can't be found in the array then it's supposed to return a -1. This is a pat of a larger project as a whole but this is the part that's causing the problems. I keep getting told by the compiler that I need a return statement even though it appears that I have that covered. There is probably someway the exit the method w/ out going through the return statement which is why I'm getting the error but I just can't figure it out and it's been driving me crazy. Here is the code:
I could have something completley offball or wrong here but I just can't seem to figure it out.