This discussion is archived
5 Replies Latest reply: Jun 12, 2007 8:38 AM by 3004 RSS

boolean always returning false;

807600 Newbie
Currently Being Moderated
Ok so i have this
public static boolean testAuth(){
               BufferedReader authReader = new BufferedReader(new FileReader("auth.txt"));
               String auth = authReader.readLine();

               URL authUrl = new URL(""+auth);
               BufferedReader urlReader = new BufferedReader(new InputStreamReader(authUrl.openStream()));

               String authResponse = urlReader.readLine();
               if(authResponse == "active"){
                    return true;
                    return false;
          }catch (IOException e){
               return false;
this is my console outpot:
kevin-roses-computer:~/Desktop kevinrose$ java test
sorry its not the exception i dot knw whats wong:

Message was edited by: