My machine crashed while I was developing on IntelliJ IDEA and when I loaded the project again, the main.java file was empty. When I opened the file in notepad++, there were only "NUL NUL NUL NUL NUL" characters. Like this: " "
It may be a stretch but... There may be .class files which IntelliJ compiled from your .java source code.
For example:
{main IDEA project DIR}/untitled/out/production/untitled/Main.class
Where "untitled" would be your project name (this is an example with a directory structure under Linux: you'll probably need to adapt for Windows).
If you manage to find that (those) file(s) you then may be able to use a Java decompiler to get you source code back from that (those) .class file(s). Note that a single .java file may give more than one .java file (for example if you have inner classes inside your main.java).
I wouldn't bother if it's small (I'd simply rewrite it) but if you had a big main.java file (which btw is never a good idea), then it may be worth it.
For the next time, as has already been suggested: look into a (D)VCS and use backups :)