Wednesday, August 17, 2011

How do you search for a word in a String array in Java?(10 point Question for any Java wiz)?

So your method returns -1 if the string isn't found, yet your conditional in the main method say's display "String found" if the return value was -1.

No comments:

Post a Comment