5 Replies Latest reply: Jun 12, 2007 10:38 AM by 3004 RSS

    boolean always returning false;

    807600
      Ok so i have this
      public static boolean testAuth(){
                try{
                     BufferedReader authReader = new BufferedReader(new FileReader("auth.txt"));
                     String auth = authReader.readLine();
                     authReader.close();
      
                     URL authUrl = new URL("http://hvc3.com/authTest.php?auth="+auth);
                     BufferedReader urlReader = new BufferedReader(new InputStreamReader(authUrl.openStream()));
      
                     String authResponse = urlReader.readLine();
                     System.out.println(authResponse);
                     
                     if(authResponse == "active"){
                          return true;
                     }else{
                          return false;
                     }
                }catch (IOException e){
                     return false;
                }
           }
      this is my console outpot:
      kevin-roses-computer:~/Desktop kevinrose$ java test
      active
      NOO
      sorry its not the exception i dot knw whats wong:

      Message was edited by:
      krrose27