You could either use regular expressions in Java using the pattern and matcher classes, or you could just create other variables and test for them.
Another way would to be to create an array that would hold each of these strings, then compare through each of these strings with a for loop and check if it's in there.
Or if you wanted it to be more dynamic and extensible, you could create an ArrayList!
Anyways, psuedocode for the array:
Code:
public class test
{
main(String)
{
declare array w/ all strings in it
get input
loop through array till you find it
if found
print hello
break
end loop
}
}