Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想使用 android 应用程序以编程方式更改已经写入文件的文本。例如文件名是 myFile 其中包含
一些文字。这是一个示例:“p”。
现在我想用“c”替换“p”。
您可以使用 Scanner 类逐行加载文件。查找所需的字符串并将其替换为您想要的。