how to throw an IOException?

前端 未结 7 1709
天涯浪人
天涯浪人 2020-12-19 04:17
public class ThrowException {
    public static void main(String[] args) {
        try {
            foo();
        }
        catch(Exception e) {
             if (e         


        
相关标签:
7条回答
  • 2020-12-19 05:22
    try {
            throw new IOException();
        } catch(IOException e) {
             System.out.println("Completed!");
        }
    
    0 讨论(0)
提交回复
热议问题