File file = new File(args[0]);

what this line of code actually mean?

Recommended Answers

All 2 Replies

as long as it is taking place in the main method it is creating a reference to a file using a name provided on the command line (the first argument after the classname in the java command).

Thanks a lot

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.