package save;
import java.io.*;
public class DI
{
public static void main(String[] args)
{
File file = new File("news.txt");
System.out.println("在当前目录下创建文件"+file.getName());
if (!file.exists())
{
try{
file.createNewFile();
System.out.println("创建成功");
}
catch( IOException exp) {}
}
}
}
Java创建文件出现 java.lang.NoClassDefFoundError:save/DI()wrong name: DI
- 写回答
- 好问题 0 提建议
- 追加酬金
- 关注问题
- 邀请回答
-