title: Combining multiple lines into one single line
body: <p>I have a text file which looks like this:</p>
  
  <pre><code>thiasisatest("test1", 
          "test2", 
          "test3", 
          "test4", 
          "test5");
  </code></pre>
  
  <p>The output I am trying to achieve is this:</p>
  
  <pre><code>thiasisatest("test1", "test2", "test3", "test4", "test5");
  </code></pre>
  
  <p>My code looks like this:</p>
  
  <pre><code>import java.io.*;
  
  public class IoTest {
  
      public static void main(String[] args) {
  
          BufferedReader br = null;
  
          try {
  
              String sCurrentLine;
  
              br = new BufferedReader(new FileReader("/Applications/textfile.txt"));
  
              while ((sCurrentLine = br.readLine()) != null) {
  
                  System.out.println(sCurrentLine.trim().replace("\n", ""));
              }
  
          } catch (IOException e) {
              e.printStackTrace();
          } finally {
              try {
                  if (br != null)br.close();
              } catch (IOException ex) {
                  ex.printStackTrace();
              }
          }
  
      }
  
  }
  </code></pre>
  
  <p>I am reading the line and replacing all lines in the while loop, but the output doesn't change and the lines are still there when I am trying to print out the string.</p>
  
  <p>What am I doing wrong? </p>
  
  <p>Thank you for your help</p>