java confused about file class
<p>So my professor gave out a review cheat and one of the questions seems a little incomplete to me. I'm not sure if he wants to read a file or write to a file or something else. I've also never been too comfortable with working with the file class so I'm sure I'm just misreading the problem from lack of knowledge. Here's the problem:</p>

<p>Given the following incomplete class definition, write appropriate Java code that will use the string str to create a file object.  </p>

<pre><code>class myFile
{
     File f;
     myFile(String str)
     {


     }
}
</code></pre>

<p>I tried looking up "using string to create file object" but some people said you can't do that, which made me a little confused since now I'm really not sure what the question intends for me to do here. Could someone please explain to me what he meant? I'll also upload my attempt at the answer after to make sure I did it right and get how to do this stuff.</p>

<p>*note this isn't homework just an ungraded optional review.</p>