猿问

我想问下关于抛出异常的问题

try catch是用来捕获异常的,百度出来说不用try的话出现异常会崩溃,那么如果写了try catch语句,但是程序又没有出现异常的话,那么这段捕获异常的代码就自动跳过了是吧


慕工程6005648
浏览 1234回答 3
3回答

慕的地8582982

WGRKRBKOHZMVEVDKYSMBFMNXATTNHEOFWRBUUJCWFYJEQNJWKSBRBROPVVWKKUUXKHHXUBVMGHCPXGDGALUUENERAXELSLVPOCITBAADKUXXOEUXPPWABCFTLEAACGTRHAEYNKBECPAHOYLWGMMWMTHKUUGTUOWSPGPNNNDNVOSSPICYSRPZGAXEXMTVIERLBPIIBYVGMGNKKKJXERQGJDGEOXUIGUKZWKOHHLBFMPJXKUOZDNRXDDQBRRKOOFBHVEOVMVPZMIMZTLLSELRPBHKAGHUXCCMIIZAJWJYMWTLECSCQXJGJVHDKAKWKAXXOAZHNINRJAVMCWJPDTTCCTEWQMANTPSPPIEPOBRULIYBGTLTPFWFOLCBHYJXKDTPFWSOCTHURIBEISOXXTDDZPQJLXUJZFFIHYTVBHNDZMWDLBDITZSMEYASBAGCGNXNRKAKBYLBOCCSLBBAEXEROKKGDDXEQOAUUXORIOQNXKQQJCZRCMTZSYEIXESAYDXAXADDDHAMFBEOHIIEVIWMUBRBSLEYWZVCAKDJJPJKRXPBCNBAUOQTMIGMTQVJCODTPDKGXQXKZWHNWNKODYUZFFCODVORXYMFYYEVFWSMMADYPXNUCPGNWDXEWLVJJXXHDNULJTAKSDCYVSJMAISWXNZZHOTBCJOZJNCZFVGEURZHNRHSTJATRXICDTKYEZPRTTZOLPDITAHJSQAIJVCYFJGVQJQNSYSJGXUATAQTBHBYDVJNTBVWTDGUBXQJWWFVUVZFRXUCTNNPCQRDWIPCPCNTNRUTGFFVJQSYIEKPZMCPBIZMDOEHVHUDAUCLJMSLYORYBQPSFKHDNMWPAGWJJGGPCIPWZLSVBPTMSAVHHIVCCFEIW

qq_昼绽_0

出现异常就执行catch{};就是针对可能出现的异常处理。
随时随地看视频慕课网APP

相关分类

Java
我要回答