timestamp as file name in java
<p>I need to create a text file in the name of current timestamp in a particular directory </p>

<blockquote>
  <p>D:\Assignments\abassign in java.</p>
</blockquote>

<p>But when i try to do that the following error comes as the file name should not contain ':'. But the timestamp contains ':'  </p>

<blockquote>
  <p>Exception in thread "main" java.io.IOException: The filename, directory name, or volume label syntax is incorrect
      at java.io.WinNTFileSystem.createFileExclusively(Native Method)
      at java.io.File.createNewFile(File.java:883)
      at abassign.Abassign.main(Abassign.java:35)
  Java Result: 1</p>
</blockquote>

<p>This error shows up</p>