从标准输入逐行读取的Scala配方是什么?类似于等效的Java代码:
import java.util.Scanner;
public class ScannerTest {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
System.out.println(sc.nextLine());
}
}
}
scala.io.StdIn