现有如下代码: public class Example { public static void main(String[] args) {// a new Example().topGo(); } void topGo() {// b middleGo(); } void middleGo() {// c go(); System.out.println("late middle"); } void go() {// d throw new Exception(); } } 为了使代码能够编译通过,需要在哪个地方加入声明throws Exception?
发布于 2020-12-25 22:05:48
登录后免费查看答案
关注者
0
被浏览
43