Java: Path vs File

后端 未结 7 1118
隐瞒了意图╮
隐瞒了意图╮ 2020-11-27 10:49

For new applications written in Java 7, is there any reason to use a java.io.File object any more or can we consider it deprecated?

I believe a java.nio.file.Path c

7条回答
  •  心在旅途
    2020-11-27 11:20

    Check this article about more info - http://www.oracle.com/technetwork/articles/javase/nio-139333.html

    Basically file.Path will be the way to go from now on but as is widely known Java people tend to keep back-compatibility so I guess that's why they have left it.

提交回复
热议问题