title: How to run Java scratch file in IntelliJ IDEA
body: <p>I just start using <code>IntelliJ-14</code> and I want to know about a scratch file. If I create a java scratch can I compile this as a normal <code>Java</code> class.
  What I Have Already Tried
  Create a <code>Java</code> class in a scratch file but unable to find any way to compile this.
  What I am looking for rather than creating a new <code>Java</code> file in an existing project for running some test code I just want to use scratch file and write some test class with the main method and after complete running close the scratch file. Is that possible?</p>