I am trying to work out whether a certain portion of a string equals something. Here is the code:
String words[] = resulter.split(" ");
secondword = words[1];
if (secondword == "is"){
isarepresent = true;
}
So, for example the string resulter could equal "Someone is famous" and then this should detect that the second word is "is". But, for some reason the if statement does not seem to work.