for循环中的变量是val还是var

for(arg <- args) println(arg) 请问arg是val 还是var 呢 答案是val,因为不能在循环体内变化
posted @ 2016-11-16 13:07  YangSheng  阅读(275)  评论(0)    收藏  举报