Couple of things:
1) It should be "four" not four. The former is a
String, the latter just looks like an undefined variable name to the compiler.
2) More importantly, even if you fix the issue in 1), Strings in Java are Objects, not primary data types. As a result,
you should not compare equality of Strings using ==, only use that for comparing primary data types like int, double, char, float, etc. When you do an == comparison on objects, you are actually checking if both object references are referring(pointing) to the same object. This however does not do a check based on the contents of the 2 objects, and is not a correct way to check equality. For Strings (and all other Objects), you will want to use the equals() method.
So it should be something like if(x.equals("four")). Note, you could also re-write it as if("four".equals(x)).
Also note that when you start writing your own classes, if you want to check the equality of 2 objects of your custom Class, you will need to implement your own equals() method for your class. Read any Java textbook/reference for more information on how to do that. Otherwise, Google is your best friend