JavaRush /Java Blog /Random EN /main method. How to pass filenames in main() parameters?
Miller777
Level 21

main method. How to pass filenames in main() parameters?

Published in the Random EN group
I met in one of the tasks (not on Javarush): There is a task - a small program in Java. One of the conditions: launching the application through public static void main(String[] args), args[] parameter: input file, file to write the response. I can't figure out how to pass file names to args[]: input.txt, jutput.txt. Please, tell me, if possible - with an example.
Comments
TO VIEW ALL COMMENTS OR TO MAKE A COMMENT,
GO TO FULL VERSION