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.
对于 Smalltalk,我们是否需要导入一些库才能使用 nextLine?
Transcript show: 'Whatz your name?'. userName := stdin nextLine.
当我尝试评估它时会引发错误。
方法#nextLine 在 Stream 中实现。标准输入应该是一个流。但是“stdin”(小写)可能是一个错字。