I'm at a loss here.
I'm tying to read text from standard input and then play with the string
in an if statement, but for some reason, the if statement won't take it.
Here's the snippet of code:

public static void main(String[] args) throws IOException {
BufferedReader stdin = new BufferedReader
(new InputStreamReader(System.in));


String selection = stdin.readLine();

if( selection == "a") {


"Blah" is never printed out even if "selection" really does equal "a".
It DOES work though, if I set "selection" to "a" before the if statement.
The if statement acts as if "selection" is null, but when I change the condition
to, "if( selection != null)", then it is accepted and prints out "blah" like
it's supposed to.
It also works if I use numeric values rather than strings.
Anyone know what the problem is?