Question about RandomAccessFile in Java?
<p>I am reading some Java text about RandomAccessFile, in the text, the author says:</p>

<pre><code>RandomAccessFile(File file, String mode)
</code></pre>

<ul>
<li><p>Mode  <strong>“r”</strong> to open the file for reading only </p>

<p>Mode <strong>“rw”</strong> to open for both reading and writing </p>

<p>Mode <strong>“rws”</strong> is same as rw and any changes to  the file’s content or
metadata take place immediately (since java 5)</p>

<p>Mode <strong>“rwd”</strong> is same as rw, and changes to the file content, but not
its metadata, take place immediately (since java 5)</p></li>
</ul>

<p>I am not sure that I understand the difference between “rws” and “rwd”. I have tried to run some related code but did not see any points?</p>

<p>Can anyone have a clear example, please?</p>
