Intellij IDEA15: 带着参数 运行

package main.scala  
  
/**  
  * Created by silentwolf on 2016/5/24.  
  */  
object FileIO {  
  
  def main(args: Array[String]) {  
  
    if (args.length != 2) {  
      System.err.println("Usage: FileIO <sourcePath> <desPath>")  
      System.exit(1)  
    }  
  
    val Array(sourcePath,desPath) = args  
  
    println("第一个参数:"+sourcePath)  
  
    println("第二个参数:"+desPath)  
  
  }  
  
}  

 

 

 

   

posted @ 2017-08-07 08:57  沙耶  阅读(648)  评论(0编辑  收藏  举报