title: Java NullPointerException in reading
body: <p>I have problem with reading from my socket i read only if value isn't null but it doesnt't works. </p>
  
  <pre><code>@Override
  public void run() {
      System.out.println("Reading from socket");
      while(true){
          try {
              if(!(br.readLine().equals(null)))read += br.readLine();
          } catch (IOException e) {
              System.out.println("error " + e);
          }
      }
  }
  </code></pre>
  
  <p>here is error:</p>
  
  <blockquote>
    <p>Exception in thread "Thread-4" java.lang.NullPointerException
        at connection.CreateConnection.run(CreateConnection.java:61)
        at java.lang.Thread.run(Unknown Source)</p>
  </blockquote>