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.
有没有办法在文件中记录 Scala REPL 的输出?
您可以导入 java.util.PrintWriter 并使用如下代码:
val out = new PrintWriter("out.txt") out.println("output string") out.flush(); out.close();