我在scala中有这段代码
val wordCounts = logData.flatMap(line => line.split(" ")).map(word => (word, 1)).reduceByKey((a, b) => a + b)
wordCounts.foreach(println(_))
那么 println(_) 是什么意思,它应该打印什么?
我在scala中有这段代码
val wordCounts = logData.flatMap(line => line.split(" ")).map(word => (word, 1)).reduceByKey((a, b) => a + b)
wordCounts.foreach(println(_))
那么 println(_) 是什么意思,它应该打印什么?