Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update java-io1.md #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions java/basis/java-io1.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ System.out.println(f1);//c:\abc\1.txt
```

**路径分隔符:**
windows: "/" "\" 都可以
windows: "/" "\\" 都可以
linux/unix: "/"
注意:如果windows选择用"\"做分割符的话,那么请记得替换成"\\",因为Java中"\"代表转义字符
注意:如果windows选择用"\"做分割符的话,那么请记得替换成"\\\\",因为Java中"\\"代表转义字符
所以推荐都使用"/",也可以直接使用代码`File.separator`,表示跨平台分隔符。
**路径:**
相对路径:
Expand Down