📜  kotlin 代码示例中的 out 修饰符

📅  最后修改于: 2022-03-11 14:53:34.675000             🧑  作者: Mango

代码示例1
in is "for input" - you wanna put(write) something into it (so it's a "consumer")

out is "for output" - you wanna take(read) something out of it (so it's a "producer")

If you're from Java,

 is for input, so it's like  (consumer)

 is for output, so it's like  (producer)