File I/O: Reading from one file and writing to another (Java)

前端 未结 5 1197
闹比i
闹比i 2021-01-05 02:36

I\'m currently working on a lab in my cpe class and we have to create a simple program that scans in strings from a .txt file and prints them to a different .txt file. So fa

5条回答
  •  青春惊慌失措
    2021-01-05 03:14

    When accessing files with Java I/O, you must include the file's filetype extension (if one exists).

        File input = new File("input.txt");
        File output = new File("output.txt");
    

提交回复
热议问题