exception

import java.io.FileReader
import java.io.FileNotFoundException
import java.io.IOException




object exception_test {
def main(args:Array[String]): Unit ={
try{val f=new FileReader("input.txt")}
catch
{
case ex:FileNotFoundException =>{println("Missing file exception")}
case ex:IOException=>{println("IO Exception")}
}
finally{println("exiting finnaly .....")}

}
}

posted on 2019-09-18 18:27  happygril3  阅读(136)  评论(0)    收藏  举报

导航