📄 exercise.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 + -