If it finds it, foundResponse is set to true, but that doesn't matter as the return statement will return a and exit the method if it finds it. If it never gets set to true, it'll go into the if...
Type: Posts; User: javapenguin
If it finds it, foundResponse is set to true, but that doesn't matter as the return statement will return a and exit the method if it finds it. If it never gets set to true, it'll go into the if...
Also, I might add that there's no need to use the Boolean wrapper class. I think that's only if you needed to either store the Boolean in like a Vector, ArrayList, Set, Map, Tree, or Linked List, or...
Also, I think you're looking for
if (vresponses.get(a).equals( response))
{
foundresponse = true;
return a;
}
Actually, why it was giving that error message, I'm not quite sure....