Right now you are using a boolean operator (the double = sign). The result of the following equation is true of false. '
The use is this (in pseudocode):
boolean isAuthenticated = false;
if (passWordIsCorrect) isAuthenticated = true;
else isAuthenticated = false;
if (isAuthenticated) allowToSeeSecretData;
note: Pseudo code is English, written in a more code like form, just to make sense. That of course will not compile.