提交 475fa9c2 编写于 作者: M Mars Liu

fixed bug in File

上级 02a8a2b7
......@@ -4,7 +4,11 @@
## 答案
B
```java
File file = new File("C:\\newfile.txt");
file.mkdirs();
```
## 选项
......@@ -20,10 +24,24 @@ file.createNewFile();
```java
File file = new File("C:\\newfile.txt");
file.mkdirs();
File file = new File("/tmp/newfile.txt");
if(!file.exists()) {
file.createNewFile();
}
```
### C
```java
File file = new File("/tmp/newfile.txt");
try{
file.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
```
### D
以上都是
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册