title: Passing variable through FileOutputStream
body: <p>So I came accross this code to save something to a .text file using FileOutputStream</p>
  
  <pre><code>try (PrintStream out = new PrintStream(new FileOutputStream("filename.txt"))) {
      out.print(text);
  }
  </code></pre>
  
  <p>Is there any way I could pass a variable to the filname such as FileOutputStream(<em>filename</em>.text)?</p>