File.separator的作用?

tartar 2003-12-31 06:37:52
如题~麻烦介绍一下!
...全文
6988 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
rmm0001 2010-06-05
  • 打赏
  • 举报
回复
是不是可以用在不同的系统中
haoqingshi 2004-01-03
  • 打赏
  • 举报
回复
java中,"\\"表示分隔,相当于在windows中的"\'
网络咖啡 2004-01-03
  • 打赏
  • 举报
回复
文件分隔符,各个操作系统不一样
如WIndows的是"\",而Unix的是"/"
yoken 2003-12-31
  • 打赏
  • 举报
回复
separator
public static final String separator
The system-dependent default name-separator character, represented as a string for convenience. This string contains a single character, namely separatorChar.

separatorChar
public static final char separatorCharThe system-dependent default name-separator character. This field is initialized to contain the first character of the value of the system property file.separator. On UNIX systems the value of this field is '/'; on Microsoft Windows systems it is '\'.

See Also:
System.getProperty(java.lang.String)

62,614

社区成员

发帖
与我相关
我的任务
社区描述
Java 2 Standard Edition
社区管理员
  • Java SE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧