Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Java by (3.5k points)

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 can do everything a java.io.File can do and more.

1 Answer

0 votes
by (46k points)

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.

Related questions

0 votes
1 answer
asked Sep 29, 2019 in Java by Shubham (3.9k points)
0 votes
1 answer
0 votes
1 answer
asked Jul 11, 2019 in Java by Ritik (3.5k points)

Browse Categories

...