Java - Read and Write a .txt file
问题 I want to read lines from a .txt file (in this case input.txt) and write them in two other .txt files depending on whether the integer number at the start of each line is odd or even. I have to use DataInputStream / DataOutputStream and BufferedInputStream / BufferedOutputStream. The input file looks like this. 1 String1 1.1 2 String2 2.2 3 String3 3.3 4 String4 4.4 5 String5 5.5 6 String6 6.6 7 String7 7.7 8 String8 8.8 9 String9 9.9 10 String10 10.1 When I run the program I get an