My intention is to remove the whitespaces and semicolons and if one of the resulting string matches "quit"...I'll print "Yikes!"
I am not sure as to why this is not working.
String someString = "abc ; def ;quit";
String[] someArray = someString.split(";");
for(int i = 0; i < someArray.length; i++) {
someArray[i] = someArray[i].trim();
if(someArray[i] == "quit") {
System.out.println("Yikes!");
}
}