我正在用 Java 编写一个程序,几乎我的一个类中的每个方法都写成这样:
public void doStuff() throws AWTException{}
有没有办法让我摆脱为每个方法输入 throws AWTException 的额外步骤,并以某种方式为整个班级做这件事?
我正在用 Java 编写一个程序,几乎我的一个类中的每个方法都写成这样:
public void doStuff() throws AWTException{}
有没有办法让我摆脱为每个方法输入 throws AWTException 的额外步骤,并以某种方式为整个班级做这件事?