我正在用Java编写程序,几乎我的一个类中的每个方法都写成:
public void doStuff() throws AWTException{}
有没有办法让我摆脱为每个方法输入抛出AWTException的额外步骤,并以某种方式为整个类做它?
java exception-handling throws
exception-handling ×1
java ×1
throws ×1