【发布时间】:2012-12-17 17:23:37
【问题描述】:
我在输入文件 a.txt 中有一些内容为
Line 1 : "abcdefghijk001mnopqr hellohello"
Line 2 : "qwertyuiop002asdfgh welcometologic"
Line 3 : "iamworkingherefromnowhere002yes somethingsomething"
Line 4 : "thiswillbesolved001here ithink"
我必须读取 a.txt 文件并将其写入两个单独的文件。即,具有 001 的行应写入 output1.txt,具有 002 的行应写入 output2.txt
谁能帮我解释一下 Java 编程中的逻辑。
谢谢, 娜仁
【问题讨论】:
-
欢迎来到 Stackoverflow。你的问题很好。如果有任何错误或逻辑错误等,请谷歌尝试并发布您的代码以在此处解决。