英语翻译The try blockIf you’re inside a method and you throw an exception (or another method you call within this method throws an exception),that method will exit in the process of throwing.If you don’t want a throw to exit the method,you ca

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/11 21:40:21
英语翻译The try blockIf you’re inside a method and you throw an exception (or another method you call within this method throws an exception),that method will exit in the process of throwing.If you don’t want a throw to exit the method,you ca

英语翻译The try blockIf you’re inside a method and you throw an exception (or another method you call within this method throws an exception),that method will exit in the process of throwing.If you don’t want a throw to exit the method,you ca
英语翻译
The try block
If you’re inside a method and you throw an exception (or another method you call within this method throws an exception),that method will exit in the process of throwing.If you don’t want a throw to exit the method,you can set up a special block within that method to capture the exception.This is called the try block because you “try” your various method calls there.The try block is an ordinary scope,preceded by the keyword try:

英语翻译The try blockIf you’re inside a method and you throw an exception (or another method you call within this method throws an exception),that method will exit in the process of throwing.If you don’t want a throw to exit the method,you ca
试验块
重新如果你'在方法和你里面抛出一个异常(或者你叫的另一种方法在内这几次方法抛出一个异常) ,那种方法将在投过程中退出.如果你指导老师' t 想要一投退出方法,你能供养一特别街区在捕获例外的那种方法内.这被叫为试验块,因为你"试试"你的各种各样的方法在那里打电话.试验块是普通的机会,在之前关键字试试: