标签:file
import java.io.BufferedInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.StringBufferInputStream;
public class InputStream1 {
//Inputstream 字节输入流
//Reader 字符输入流
public static void main(String[] args) {
// TODO Auto-generated method stub
String path1="D:/aa";
String path2="D:/aa/cc.java";
File file=new File(path1);
if(!file.exists()){
file.mkdirs();
}
System.out.println("在D盘创建文件夹aa成功");
File file1=new File(path2);
if(!file1.exists()){
try{
file1.createNewFile();
}catch(IOException e){
e.printStackTrace();
}
}
}
}
标签:file
原文地址:http://yuwanghua12.blog.51cto.com/3360220/1660608