创建临时文件
/*N o w J a v a . c o m*/ import java.io.*; public class Main { public static void main(String[] args) { File file1 = null; File file2 = null; try { file1 = File.createTempFile("JavaTemp", null); file2 = File.createTempFile("JavaTemp", ".javatemp"); } catch(IOException ioe) { System.out.println("Exception creating temporary file : " + ioe); } System.out.println("Temporary file without suffix extension: " + file1.getPath()); System