1.
//args.foreach(arg => println(arg))
args.foreach(println)
2.
var i = 0
while(i < args.length) {
println(args(i))
i += 1
}
3.
for(arg <- args)
println(arg)
1.
//args.foreach(arg => println(arg))
args.foreach(println)
2.
var i = 0
while(i < args.length) {
println(args(i))
i += 1
}
3.
for(arg <- args)
println(arg)
转载于:https://www.cnblogs.com/shengyang/p/6069110.html