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.
我只是想在记事本文件中添加一个字符串。让我们将记事本文件称为“Values.txt”说我有;
public static void main(String[] args) { String myText = "Let's add this string to a notepad file"; // Code to add string to a notepad file }
那个代码是什么?
看看基本 I/O 教程。它只是在操作一个文本文件。您的所有需求都应该在那里得到满足。