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();
            }
            
         }
         
       
         
       
    }

}

最近在学习io流,写个博客记录一下O(∩_∩)O~

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-01-08
  • 2021-12-30
  • 2021-04-17
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-07-18
  • 2022-12-23
  • 2021-09-08
  • 2022-12-23
  • 2022-02-01
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案