⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 exercise.java

📁 java编程代码
💻 JAVA
字号:

public class Exercise
{
    public static void main(String[] args)
    {
       try
       {
           System.out.println("Trying");
           sampleMethod(98.6);
           System.out.println("Trying after call.");
       }
       catch(Exception e)
       {
           System.out.println("Catching.");
       }

       System.out.println("End program.");
    }

    public static void sampleMethod(double test) 
                                          throws Exception
    {
           System.out.println("Starting sampleMethod.");
           if (test < 100)
                   throw new Exception( );
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -