編寫程序在windows下創建目錄樹D:\temp\temp1\temp2,并創建一個文件1.txt,在該文件中寫入字符串”How are you!”。一會就要上傳的,在線的朋友幫幫我.謝了
熱心網友
packagea; .*;/***Title:**Description:** (c)2005**Company:**@authornotattributable*@version1.0*/publicclassA{publicstaticvoidmain(String[]args)throwsIOException{booleansuccess=(newFile("d:/temp/temp1/temp2")).mkdirs();assertsuccess=true;BufferedWriterbw=newBufferedWriter(newFileWriter("d:/temp/temp1/temp2/1.txt"));bw.write("Howareyou!"); ose();}}