Difference between File.separator and slash in paths

后端 未结 14 1239
执笔经年
执笔经年 2020-11-22 13:15

What is the difference between using File.separator and a normal / in a Java Path-String?

In contrast to double backslash \\\\

14条回答
  •  情歌与酒
    2020-11-22 13:32

    As the gentlemen described the difference with variant details.

    I would like to recommend the use of the Apache Commons io api, class FilenameUtils when dealing with files in a program with the possibility of deploying on multiple OSs.

提交回复
热议问题