Back

Explore Courses Blog Tutorials Interview Questions
0 votes
3 views
in Java by (10.2k points)
How do I create a new URL object using a local file, for the purpose of unit tests?

1 Answer

0 votes
by (46k points)

Try:

new File(path).toURI().toURL();

Related questions

0 votes
1 answer
asked Nov 24, 2019 in Java by Anvi (10.2k points)
0 votes
1 answer
0 votes
1 answer

Browse Categories

...