Creating a .txt File and Changing its Directory in Java
<p>I am creating a .txt file with this:</p>

<pre><code>FileWriter fstream = new FileWriter("out.txt");
BufferedWriter out = new BufferedWriter(fstream);
</code></pre>

<p>And I am writing something in it. But I want to also determine its directory. For example, my workspace is under C, but I want to create .txt under D. How can I do that?</p>
