/* package whatever; // don't place package name! */ import java.util.*;import java.lang.*;import java.io.*; /* Name of the class has to be "Main" only if the class is public. */class Ideone { public static void main (String[] args) throws java.lang.Exception { // your code goes here File file = new File("text.txt"); file.createNewFile(); }}
Standard input is empty
Standard output is empty
Exception in thread "main" java.io.IOException: Permission denied at java.io.UnixFileSystem.createFileExclusively(Native Method) at java.io.File.createNewFile(File.java:1012) at Ideone.main(Main.java:12)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!