import java.io.File; |
import java.io.IOException; |
public class CreateNewFile1{ |
public static void main(String[] args){ |
// 实例化File类的对象 |
File f = new File( "f:" +File.separator+ "bchxsx.java" ); |
try { |
f.createNewFile(); |
} catch (IOException e){ |
e.printStackTrace(); |
} |
} |
} |